Git Product home page Git Product logo

node-jpegtran-bin's Introduction

node-jpegtran-bin Build Status

jpegtran 1.2.90 (part of libjpeg-turbo) Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows. Most commonly used to losslessly minify JPEG images.

libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal.

Example usage

var execFile = require('child_process').execFile;
var jpegtranPath = require('jpegtran-bin').path;

execFile(jpegtranPath, ['-outfile', 'output.jpg', 'input.jpg'], function(err, stdout, stderr) {
	console.log('Image minified');
});

You can also run directly from ./node_modules/.bin/jpegtran-bin

Dev

Note to self on how to update the binaries.

OS X and Linux

Run npm install to build the binary.

Windows

  • Download the Windows files 32/64-bit (GCC compiled) on a Windows machine
  • Run the downloaded file to extract
  • Go to the bin folder at the destination and copy jpegtran.exe and libjpeg-62.dll

License

Everything excluding the binaries licensed under the BSD license and copyright Google.

libjpeg-turbo licensed under the BSD license and copyright dcommander.

node-jpegtran-bin's People

Contributors

sindresorhus avatar kevva avatar passy avatar sebdeckers avatar

Watchers

James Cloos 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.