Set Background color: Opposite of -transparent

imagemagick

Solution

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.

Problem

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).

Original source

Related problems