fmw42 wrote:P.S. I am not sure what the difference is between -alpha flatten and -background somecolor -flatten. Perhaps the former just flattens the alpha channel agains the background image and so does not need any -background color.
-alpha remove (as it should now be called as it removes alpha transparency) does exactly the same thing as...
or
and so on.
However it does not look at 'vitural canvas' or merge multiple images as
-flatten can.
Also it uses 'background' not 'bordercolor' as the
-border equivalent does.
The BIG plus however (after looking at code) is it does NOT actually generate a extra 'canvas' image for the composition
as the all other 'composition' transparency removal methods do. What it does is directly compose each pixel against the background color (over method). No extra image (and memory) needed internally.
Basically
-alpha remove does a over compose against the background color, without any of the side effects all the other 'equivalent' methods have! It just does the task, simply without complications.
Note it also does not actually 'turn off' alpha As such after this operation against a fully-opaque background color, the alpha channel will also be fully-opaque.
ASIDE: alpha channel at this time is never destroyed, only turned off, unless a new image is created. In future a '-alpha Destroy' option may be added to actually completely delete the alpha channel form an iamge and save memory but so far their has been no need for that.