For some time
-channel A actually produces 'matte' values (zero=opaque) in IMv6.
See older example in...
http://www.imagemagick.org/Usage/masking/#matte
Code: Select all
convert moon.png -channel matte -separate moon_matte.png
In IMv5 you would have needed to use this (awkward) technique to get the 'matte' channel
Code: Select all
convert moon.png matte:moon.matte
convert MIFF:moon.matte moon_matte2.png
YES these example uses 'matte' instead of 'a' or the channel setting but that is for clarity. In the channel setting matte and alpha flags are the same, and their is no way for operators to distinguish between them.
This was why
-alpha extract was originally added to IM.
However IMv7, with its use of actual alpha values in memory storage, would invert the result of
-channel A -separate. However you should still use
-alpha extract when that is what you want.
As such It is probably time for
-channel A -separate to be fixed, and produce alpha channel results, BUT scripts that used that now very old technique
WILL BREAK.
Update:
This has already been done!... That is -separate output alpha, not matte channel images only.
The choice then comes does to, breaking very old scripts and do the right thing, or preserve backward compatibility.
OR, add some quick hack to the IMv6 'channel flags' to allow -separate to distinguish between a user asking for the obsolete
-channel o and the newer
-channel a setting.
That is
-channel rgbo produces different results to the more normal
-channel rgba setting, when used with
-separate (and only with
-separate!)