Page 1 of 1

v7 read-mask minima

Posted: 2016-01-30T00:12:09-07:00
by snibgo
With "-read-mask", %[fx:minima] returns the wrong value.

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:
"-verbose info:" reports:

Code: Select all

    Gray:
      min: 15887 (0.24242)
      max: 29127 (0.44445)
      mean: 22507 (0.343435)
      standard deviation: 3606.43 (0.0550306)
The individual formats report the same values except for fx:minima, which reports "0".

Re: v7 read-mask minima

Posted: 2016-01-30T04:09:21-07:00
by snibgo
EDIT: I should have said, this is on Windows 8.1, with the pre-built binary:

Code: Select all

f:\web\im>magick -version

Version: ImageMagick 7.0.0-0 Q16 x64 2016-01-23 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

Re: v7 read-mask minima

Posted: 2016-01-30T11:33:47-07:00
by fmw42
I get the same 0 value for fx:minima on Mac OSX with the same tests as snibgo on

Code: Select all

im7 convert -version
Version: ImageMagick 7.0.0-0 Q16 x86_64 2016-01-30 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP 
Delegates (built-in): bzlib cairo fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib