Page 1 of 1

possible bug -channel a or [mean] string format

Posted: 2014-04-30T15:34:18-07:00
by fmw42
IM 6.8.9.0 Q16 Mac OSX.

The following is, if not a bug, at least very confusing

If I run the following command, I get a zero result indicating that the alpha channel is perfectly transparent as expected.

Code: Select all

convert rose: -alpha transparent -channel a -separate -scale 1x1! -format "%[fx:u]\n" info:
0

If I run these two commands, I get a non-zero result, in fact, the largest possible value indicating that it is reporting the opacity and not the alpha channel.

Code: Select all

convert rose: -alpha transparent -channel a -format "%[mean]\n" info:
65535

convert rose: -alpha set -channel a -evaluate set 0 -format "%[mean]\n" info:
65535

I though all references to -channel A were now transparency and not opacity. Please clarify.



This appears to be a bug, since I get NAN for the result

Code: Select all

convert rose: -alpha transparent -channel a -separate -format "%[mean]\n" info:
nan

Re: possible bug -channel a or [mean] string format

Posted: 2014-05-01T10:15:14-07:00
by snibgo
Yes, it does seem to be reporting opacity instead of transparency.

F:\web\im>%IM%convert rose: -alpha transparent -channel A -evaluate add 25% -format "%[mean]\n" info:
49151

F:\web\im>%IM%convert rose: -alpha transparent -channel A -evaluate add 75% -format "%[mean]\n" info:
16383

F:\web\im>%IM%convert rose: -alpha transparent -channel A -evaluate add 100% -format "%[mean]\n" info:
0