v7 read-mask minima

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.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

v7 read-mask minima

Post 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".
snibgo's IM pages: im.snibgo.com
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: v7 read-mask minima

Post 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
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: v7 read-mask minima

Post 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
Post Reply