node.jsimagemagickgraphicsmagickgm

GraphicsMagick / ImageMagick replace all non-transparent pixels (like Photoshop's Color Overlay)


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:

Original image

Goal:

enter image description here

Transparent pixels should stay transparent. I'm trying to achieve Photoshop's Color Overlay effect:

enter image description here


Solution

  • This is a bit simpler. In ImageMagick do the following:

    convert 84xHk.png -fill "#E91FCB" +opaque none result.png
    

    enter image description here