Skip to content
This repository

High speed image encoding, stiching, and compositing

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 benchmark
Octocat-spinner-32 lib update tests to mocha February 07, 2012
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE initial version May 28, 2011
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 configure
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
Octocat-spinner-32 wscript
README.md

node-blend

This module alpha-composites images of the same size and returns the compressed image.

Usage

var blend = require('blend');
var image1; // Contains a compressed PNG image as a buffer.
var image2;
blend([ image1, image2 ], function(err, result) {
    // result contains the blended result image compressed as PNG.
});

blend([ image1, image2 ], {
    format: 'jpeg',
    quality: 90
}, function(err, result) {
    // result contains the blended result image compressed as JPEG.
});

Installation

To compile, this module requires libjpeg and libpng.

Both /usr and /usr/local with be searched for these dependencies by default.

On Ubuntu, type sudo apt-get install libjpeg8-dev libpng12-dev to install them.

Mac OS X ships with png at /usr/X11, which will also be searched.

If you have jpeg or png installed in a custom location you can do:

./configure --with-jpeg=/opt/jpeg --with-png=/opt/png

Development

To run tests for this module, run npm install --dev to install the testing framework, then npm test. Tests require Imagemagick for its compare utility.

Something went wrong with that request. Please try again.