Possible bug IM 6: Inconsistency in getting mean of alpha data?

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

Possible bug IM 6: Inconsistency in getting mean of alpha data?

Post by fmw42 »

IM 6.9.10.51 Q16 Mac OSX

# create fully transparent image

Code: Select all

convert -size 100x100 xc:none x.png
Test if transparent is opposite polarity if use %[mean] than %[fx:mean]

# expected result

Code: Select all

convert x.png -channel a -format "%[fx:mean]" info:
0

# unexpected result

Code: Select all

convert x.png -channel a -format "%[mean]" info:
65535 <--- should be 0

# similarly, unexpected result

Code: Select all

convert x.png -format "%[fx:mean.a]" info:
1 <--- should be 0

# same if use .o rather than .a

Code: Select all

convert x.png -format "%[fx:mean.o]" info:
1 <--- should be 0


With IM 7.0.8.51, the following gives proper results:

Code: Select all

magick x.png -channel a -format "%[fx:mean]" info:
0

Code: Select all

magick x.png -channel a -format "%[mean]" info:
0

Code: Select all

magick x.png -format "%[fx:mean.a]" info:
0

Code: Select all

magick x.png -format "%[fx:mean.o]" info:
0
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible bug IM 6: Inconsistency in getting mean of alpha data?

Post by magick »

IMv6 has deficiencies that we addressed in IMv7. This is one of them. We cannot fix the problem you posted.
Post Reply