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
|
8 years ago | |
---|---|---|
src | 8 years ago | |
test | 8 years ago | |
.gitignore | 8 years ago | |
.travis.yml | 8 years ago | |
LICENSE | 8 years ago | |
README.md | 8 years ago | |
package.json | 8 years ago |
README.md
merge-images
Easily compose images together without messing around in canvas
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