Page 1 of 1

fx:maxima

Posted: 2013-11-15T05:03:02-07:00
by snibgo
Do I have brain-fade or is IM miscalculating maxima.a, the maximum value in the alpha channel?

Code: Select all

D:\web\im>%IMG6875%convert xc:rgba(100,101,102,0) -format %[fx:maxima.a] info:
1
D:\web\im>%IMG6875%convert xc:rgba(100,101,102,1) -format %[fx:maxima.a] info:
0
D:\web\im>%IMG6875%convert xc:rgba(100,101,102,0.3) -format %[fx:maxima.a] info:
0.700008
Windows 7, IM v6.8.7-5.

Re: fx:maxima

Posted: 2013-11-15T05:15:13-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.7-6 Beta available by sometime tomorrow. Thanks.

Re: fx:maxima

Posted: 2013-11-15T05:31:26-07:00
by snibgo
Thanks. While you are in that area, I see that .o should represent the opacity, but doesn't.

Code: Select all

D:\web\im>%IMG6875%convert xc:rgba(100,101,102,0) -format %[fx:maxima.o] info:
0.4
D:\web\im>%IMG6875%convert xc:rgba(100,101,102,1) -format %[fx:maxima.o] info:
0.4
D:\web\im>%IMG6875%convert xc:rgba(100,101,102,0.3) -format %[fx:maxima.o] info:
0.4

Re: fx:maxima

Posted: 2013-11-15T05:50:55-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.7-6 Beta available by sometime tomorrow. Thanks.

Re: fx:maxima

Posted: 2013-11-15T10:32:35-07:00
by fmw42
Magick:

I was under the impression that -channel a and -channel o meant the same thing --- opacity. Am I wrong about this. Have we started to distinguish the two?

Nevertheless, the following does not work either in 6.8.7.5 Q16 Mac OSX


convert xc:"rgba(100,101,102,0)" -channel a -format "%[fx:maxima]\n" info:
0.4
convert xc:"rgba(100,101,102,1)" -channel a -format "%[fx:maxima]\n" info:
0.4
convert xc:"rgba(100,101,102,0.3)" -channel a -format "%[fx:maxima]\n" info:
0.4

convert xc:"rgba(100,101,102,0)" -channel o -format "%[fx:maxima]\n" info:
0.4
convert xc:"rgba(100,101,102,1)" -channel o -format "%[fx:maxima]\n" info:
0.4
convert xc:"rgba(100,101,102,0.3)" -channel o -format "%[fx:maxima]\n" info:
0.4

Re: fx:maxima

Posted: 2013-11-15T13:35:25-07:00
by snibgo
As far as I know, alpha and opacity in this context should mean the same thing. But ".a" in my OP examples returns a number meaning transparency, and ".o" returns 0.4. I hope that after the fix they will both return the numbers that I put into the alpha channel.

Re: fx:maxima

Posted: 2013-11-15T13:45:11-07:00
by magick
A is for alpha, O is for opacity. ImageMagick version 7 only supports alpha.