I’m trying to replace all non-transparent pixels to a given color using GraphicsMagick for Node.
Using a composite image is not an option, I simply need to change every non-transparent pixel to a given color.
Original image:
Goal:
Transparent pixels should stay transparent. I’m trying to achieve Photoshop’s Color Overlay effect:
2
Answers
I’m not familiar with Node’s GraphicsMagick library, but there are a few methods to achieve this. Here’s a few I can think of…
Extract alpha, and replace colors
Create solid color image, and copy alpha channel
Use FX expressions
This is a bit simpler. In ImageMagick do the following: