fx:maxima

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

fx:maxima

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: fx:maxima

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: fx:maxima

Post 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
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: fx:maxima

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: fx:maxima

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: fx:maxima

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: fx:maxima

Post by magick »

A is for alpha, O is for opacity. ImageMagick version 7 only supports alpha.
Post Reply