preco21 / merge-img

Merge multiple images into a single image
MIT License
94 stars 29 forks source link
compose concat convert image manipulation merge

merge-img

Code Style Prev NPM Version Build Status Dependency Status

Merge multiple images into a single image

merge-img merges given images into a single image in right order. This will be helpful in a situation when you have to generate a preview of multiple images into a single image. This module is based on Jimp for image processing.

figure Image credit: https://www.pexels.com/

Install

$ npm install merge-img

Usage

import mergeImg from 'merge-img';

mergeImg(['image-1.png', 'image-2.jpg'])
  .then((img) => {
    // Save image as file
    img.write('out.png', () => console.log('done'));
  });

API

mergeImg(images[, options])

Returns a Promise that contains Jimp object.

License

MIT