Giter Club home page Giter Club logo

node-jpeg-turbo's Introduction

node-jpeg-turbo

Build Status npm

node-jpeg-turbo provides minimal libjpeg-turbo bindings for Node.js. It is very, very fast compared to other alternatives, such as node-imagemagick-native or jpeg-js.

Currently the focus is on decompressing images as quickly as possible.

Requirements

We use NAN to guarantee maximum v8 API compatibility, so in theory any Node.js or io.js version should work fine. For maximum convenience we also use node-pre-gyp to publish prebuilt binaries for a few common platforms. For example, if you're on OS X and using the latest stable Node, you probably won't need to do a thing.

If you must build from source

Due to massive linking pain on Ubuntu, we embed and build libjpeg-turbo directly with node-gyp. Unfortunately this adds an extra requirement, as the build process needs yasm to enable all optimizations. Note that this step is only required for x86 and x86_64 architectures. You don't need yasm if you're building on arm, for example.

Here's how to install yasm:

On OS X

brew install yasm

On Ubuntu 14.04

apt-get install yasm

On Ubuntu 12.04

apt-get install yasm

Important! Ubuntu 12.04 comes with GCC 4.6, which is too old to compile the add-on (and most other modules since Node.js 4.0 was released). More information is available here.

If you really must use this module on Ubuntu 12.04, the following may work:

apt-get install python-software-properties
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get -y install g++-4.8
export CXX=g++-4.8

Remember to export CXX when you npm install.

On Debian

apt-get install yasm

On Alpine Linux

apk add yasm

Others

Search your package manager for yasm.

Installation

Make sure you've got the requirements installed. Then simply install from NPM:

npm install --save jpeg-turbo

Thanks

License

See LICENSE.

Copyright © Simo Kinnunen. All Rights Reserved.

node-jpeg-turbo's People

Contributors

sorccu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.