Hide One Image In Another Using Alpha Channel – image-hide

Category: Image , Javascript | October 24, 2019
Author: Coxxs
Views Total: 49 views
Official Page: Go to website
Last Update: October 24, 2019
License: MIT

Preview:

Hide One Image In Another Using Alpha Channel – image-hide

Description:

image-hide is a JavaScript module to hide one image in another using PNG alpha channel.

How to use it:

1. Install and import the image-hide module.

# NPM
$ npm install image-hide --save
const fs = require('fs')
const hide = require('image-hide')

2. Prepare two PNG images with the same size.

let imageA = fs.readFileSync('a.png')
let imageB = fs.readFileSync('b.png')

3. Combine these 2 images together.

fs.writeFileSync('result.png', Buffer.from(hide(imageA, imageB)))

You Might Be Interested In:


Leave a Reply