Reputation: 46369
Say I have a PNG with transparent pixels, how could I translate them to a solid color?
(Note this is slightly different to this question as I'm looking to replace with an arbitrary color. White is "special" in ImageMagick, as the accepted answer there indicates by the fact it omits to mention white).
Upvotes: 9
Views: 8346
Reputation: 6331
For me, the following works (ImageMagick 6.6.3-1):
convert in.png -background "#FF0000" -flatten out.png
Just swap the red color to whatever suits your needs.
Upvotes: 21