Alpha background only sets the color of pixels which are fully transparent. It does not effect the color of semi-transparent pixels, whcih is the color you see when you true off alpha.
The BEST way to handle this if to overlay the image onto a background of the right color.
and there are two method in IM that are commonly used for this purpose.
The first is to 'flatten' the image onto a background...
Code: Select all
-background {color} -flatten -alpha off
This is the most common method the whole technique has become known as 'flattening' images, though really it is more a 'set image background' operation. however it only works for one image, as the operators real task is to 'flatten' multiple images into a single image.
The other common method will work for a sequence of images, and will leave the images separate, but with the transparency replaced by the boarder color.
Code: Select all
-bordercolor {color} -border 0 -alpha off
Other operators can also do this too, but the operators 'normal' actions more often than not gets in the way. These operators include... -mosaic, -layers merge, -frame, -coalease.
However what you are really trying to do (in full) is..
Code: Select all
.... \( +clone -alpha opaque -fill {color} -colorize 100% \) \
+swap -geometry +0+0 -compose Over -composite -alpha off ....
The above has now been collected together in IM examples, Basics,
Removing Alpha transparency
http://www.imagemagick.org/Usage/basics/#alpha_remove
This section now replaces all the other sections and bits around IM Examples that previously looked at or discussed removing alpha channel, Such as
JPEG Transparency - NOT
http://www.imagemagick.org/Usage/format/#jpg_trans