Possible bug IM 6: Inconsistency in getting mean of alpha data?
Posted: 2019-07-02T14:45:06-07:00
IM 6.9.10.51 Q16 Mac OSX
# create fully transparent image
Test if transparent is opposite polarity if use %[mean] than %[fx:mean]
# expected result
0
# unexpected result
65535 <--- should be 0
# similarly, unexpected result
1 <--- should be 0
# same if use .o rather than .a
1 <--- should be 0
With IM 7.0.8.51, the following gives proper results:
0
0
0
0
# create fully transparent image
Code: Select all
convert -size 100x100 xc:none x.png
# expected result
Code: Select all
convert x.png -channel a -format "%[fx:mean]" info:
# unexpected result
Code: Select all
convert x.png -channel a -format "%[mean]" info:
# similarly, unexpected result
Code: Select all
convert x.png -format "%[fx:mean.a]" info:
# same if use .o rather than .a
Code: Select all
convert x.png -format "%[fx:mean.o]" info:
With IM 7.0.8.51, the following gives proper results:
Code: Select all
magick x.png -channel a -format "%[fx:mean]" info:
Code: Select all
magick x.png -channel a -format "%[mean]" info:
Code: Select all
magick x.png -format "%[fx:mean.a]" info:
Code: Select all
magick x.png -format "%[fx:mean.o]" info: