Test case: a gradient image, using a mask of a small black circle on a white background. In the following, %IM%convert is v6. Windows BAT syntax.
Code: Select all
%IM%convert -size 100x100 gradient: g.png
%IM%convert -size 100x100 xc:white -fill Black -draw "circle 50,65 50,75" m.png
magick g.png -read-mask m.png -verbose info:
magick g.png -read-mask m.png -format "%%[fx:minima]" info:
magick g.png -read-mask m.png -format "%%[fx:maxima]" info:
magick g.png -read-mask m.png -format "%%[fx:mean]" info:
magick g.png -read-mask m.png -format "%%[fx:standard_deviation]" info:
Code: Select all
Gray:
min: 15887 (0.24242)
max: 29127 (0.44445)
mean: 22507 (0.343435)
standard deviation: 3606.43 (0.0550306)