Page 1 of 1

mean.a incorrect

Posted: 2015-11-08T19:53:52-07:00
by snibgo
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.

Re: mean.a incorrect

Posted: 2015-11-09T04:18:09-07:00
by magick
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?

Re: mean.a incorrect

Posted: 2015-11-09T13:06:30-07:00
by snibgo
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.