I see the +level-colors flag was added to convert about a week after the latest version of MagickWand. I really need this functionality in MW. Does anyone know if there is an equivalent function in MW?
What I'm trying to do is take a PNG with some plain white text on it and a mask around that text and change the text color to any other color I want while preserving the mask.
Thanks so much!
convert +level-colors equivalent in MagickWand
Re: convert +level-colors equivalent in MagickWand
My best solution seems too involved. But, here it is:
Load image $a
Create copy $b
Fill $a with new color (MW_ResetMethod)
Separate alpha mask from $b
Invert $b
Composite $b on to $a (MW_CopyOpacityCompositeOp)
Save a$
Load image $a
Create copy $b
Fill $a with new color (MW_ResetMethod)
Separate alpha mask from $b
Invert $b
Composite $b on to $a (MW_CopyOpacityCompositeOp)
Save a$