New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

image-glue

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-glue

JavaScript library to combine two images together

latest
Source
npmnpm
Version
0.1.20
Version published
Maintainers
1
Created
Source

image-glue

Library to combine two images: + =>

image-glue uses sharp. Great library, thanks! 👏

Installation

npm i --save image-glue

Use

import fs from 'fs'
import {merge} from 'image-glue'

const image1 = fs.readFileSync('./image1.jpg')
const image2 = fs.readFileSync('./image2.jpg')
const opts = { format: 'jpeg', background: { r: 150, g: 150, b: 150 }, output: { quality: 100 } }
merge([image1, image2], opts).then(combinedImage => fs.writeFileSync('./combined-image.jpg', combinedImage))

opts

PropertyExplanation
formatOutput format. Defaults to the format of the first image.
backgroundBackground color. Defaults to { r: 255, g: 255, b: 255 } if first image does not have the alpha channel. Defaults to { r: 0, g: 0, b: 0, alpha: 0 } if the first image does have the alpha channel
outputOutput properties. You can set quality like this: {quality: 1}

Keywords

combine

FAQs

Package last updated on 03 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts