You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Luke Childs 5eea8475bf Add usage section 8 years ago
src Reject map Promise not main Promise 8 years ago
test Test mergeImages uses custom positions 8 years ago
.gitignore Woops 8 years ago
.travis.yml Use latest node-gyp 8 years ago
LICENSE Initial commit 8 years ago
README.md Add usage section 8 years ago
package.json Add DataURI helper 8 years ago

README.md

merge-images

Easily compose images together without messing around in canvas

Build Status Coverage Status npm

Images can be overlaid on top of each other and repositioned. Returns a Promise which resolves to a base64 data URI for the composed image. Works both in the browser and in Node.js.

Install

npm install --save merge-images

Usage

With the following images:

/body.png /eyes.png /mouth.png
const mergeImages = require('merge-images');

mergeImages(['/body.png', '/eyes.png', '/mouth.png'])
  .then(b64 => console.log(b64));
  // data:image/png;base64,iVBORw0KGgoAA...

And that base64 output looks like this:

License

MIT © Luke Childs