Hi how to add watermark using Jimp and please provide example for mask
Example of adding a watermark:
var p1 = Jimp.read("image.jpg");
var p2 = Jimp.read("watermark.png");
Promise.all([p1, p2]).then(images => {
images[0].composite(images[1], 0, 0).write("output.png");
});
And an example of a mask (the black pixels of the mask will determine what parts of the original image are masked):
var p1 = Jimp.read("image.jpg");
var p2 = Jimp.read("mask.png");
Promise.all([p1, p2]).then(images => {
images[0].mask(images[1], 0, 0).write("output.png");
});
It's not working for me :(
it is working very well to me. Mac
node -v
v8.11.1
jimp
v0.6.1
Most helpful comment
Example of adding a watermark:
And an example of a mask (the black pixels of the mask will determine what parts of the original image are masked):