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.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2015-11-08T19:53:52-07:00
IM v6.9.2-5 on Windows 8.1.
Code: Select all
convert xc:White xc:None xc:None +append -format %[fx:mean.a] info:
0.666667
The image has two pixels with a=0 and one pixel at a=1. So the mean should be 0.33333.
This worked fine in v6.9.1-6. Perhaps the fix to
alpha minima >= maxima caused this problem.
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2015-11-09T04:18:09-07:00
Try
convert xc:White xc:None xc:None +append -format '%[fx:mean.o]' info:
0.666667
Which displays the mean opacity rather than alpha. Is that not correct?
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2015-11-09T13:06:30-07:00
Which displays the mean opacity rather than alpha. Is that not correct?
No, it isn't correct. We have one white pixel (alpha = opacity = 1) and two transparent black pixels (alpha = opacity = 0). (1+0+0)/3 = 0.3333.