The -alpha documentation says:
However, I see no difference in the following images nor their identify -verbose (information). They are all alpha enabled but all opaque.Set copies the gray-scale intensity of the image into the alpha channel, converting a gray-scale mask, into a transparent shaped image ready to be colored appropriately.
The -matte operation is equivelent to doing a "-alpha on", followed by a "-alpha reset" if the image did not have a matte/alpha channel before hand. The +matte operation is however exactly the same as a "-alpha off", the alpha channel is left in place, just disabled.
convert -size 100x100 gradient: -matte grad_matte.png
identify -verbose grad_matte.png
Channel depth:
gray: 16-bit
alpha: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 65535 (1)
mean: 32767.5 (0.5)
standard deviation: 19108.4 (0.291576)
alpha:
min: 65535 (1)
max: 65535 (1)
mean: 65535 (1)
standard deviation: -0 (-0)
convert -size 100x100 gradient: -alpha on grad_alpha_on.png
identify -verbose grad_alpha_on.png
Channel depth:
gray: 16-bit
alpha: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 65535 (1)
mean: 32767.5 (0.5)
standard deviation: 19108.4 (0.291576)
alpha:
min: 65535 (1)
max: 65535 (1)
mean: 65535 (1)
standard deviation: -0 (-0)
convert -size 100x100 gradient: -alpha on -alpha reset grad_alpha_on_reset.png
identify -verbose grad_alpha_on_reset.png
Channel statistics:
gray:
min: 0 (0)
max: 65535 (1)
mean: 32767.5 (0.5)
standard deviation: 19108.4 (0.291576)
alpha:
min: 65535 (1)
max: 65535 (1)
mean: 65535 (1)
standard deviation: -0 (-0)
convert -size 100x100 gradient: -alpha set grad_alpha_set.png
identify -verbose grad_alpha_set.png
Depth: 16-bit
Channel depth:
gray: 16-bit
alpha: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 65535 (1)
mean: 32767.5 (0.5)
standard deviation: 19108.4 (0.291576)
alpha:
min: 65535 (1)
max: 65535 (1)
mean: 65535 (1)
standard deviation: -0 (-0)
The above documentation seems to indicate that:
-alpha set will take the gray-scale intensity and put it into the alpha channel. Thus I would expect to find a gradient alpha channel when used with my gradient example. This does not seem to happen . All I get is a fully opaque alpha channel.
The above also seems to indicate that -alpha on is different from -matte in that one needs to also apply -alpha reset. Thus one might construe this to mean that -alpha on enables the alpha channel as transparent. But this is not the case. When using simply -apha on, one gets an opaque alpha channel just like -matte.
So is there some bug or is the documentation either in error or not clear?
Also from Anthony's page at http://www.imagemagick.org/Usage/basics/#alpha
it says:
Although this is backwards (Anthony needs to reverse the usage of set and reset in the above), I assume it really implies that -alpha set will make the alpha channel fully transparent and -alpha reset will make it fully opaque.Set, Reset
make alpha channel fully-opaque, or fully-transparent resp.
So I am confused about 1) what -alpha set is suppose to do and 2) why -alpha reset is needed after -alpha on?