Created
May 27, 2020 17:56
-
-
Save sahilpaudel/8ad5b436489b6bc2be4300e9daff2476 to your computer and use it in GitHub Desktop.
Create Image from buffer and save to destination folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const watermark = require('./watermark'); | |
const path = `assets/target.png`; | |
const w = 500; | |
const h = 500; | |
watermark.drawWatermarkAsBuffer(path, './assets/watermark_source.png', w, h).then(buffer => { | |
require("fs").writeFile("assets/output.png", buffer, 'base64', function(err) { | |
console.log(err); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment