I am trying to colorize an image by overlaying a color on a greyscale PNG image.
The greyscale PNG is product picture with alpha channel and i want to naturally colorize this image.
I manage to apply the color to non transparent pixels but the color is composition mode is not "Over" (Photoshop = overlay).
This is the code i use to apply the color for now :
gm('product.png')
.options({imageMagick: true})
.fill('#ff5400')
.colorize(100)
.write('product_colorized.png', function (err) {
if (!err) console.log('Image creation done');
});
I already tried all possible options like .compose('Over'), .channel('Opacity')...etc
Does anyone has on clue on this ?