possible bug miff vs mpc IM 6.8.9.2 Q16 Mac OSX

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug miff vs mpc IM 6.8.9.2 Q16 Mac OSX

Post by fmw42 »

Is this a bug or some feature (of miff) that I do not understand? Why do I not get identical results (rmse = 0). I believe that the miff is the one in error from other tests with one of my scripts. This is a subset of 5 command lines that I had performed separately saving as 1) mpc, or 2) miff or 3) all in one command line. The mpc results match the all in one command line results. This is the first command that did not match in the sequence of 5 commands.

Code: Select all

convert rose: -colorspace HSI -set colorspace sRGB rose.mpc
convert rose: -colorspace HSI -set colorspace sRGB rose.miff
compare -metric rmse rose.mpc rose.miff null:
72.589 (0.00110764)


convert -version
Version: ImageMagick 6.8.9-2 Q16 x86_64 2014-05-30 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib cairo fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug miff vs mpc IM 6.8.9.2 Q16 Mac OSX

Post by fmw42 »

This does not appear to be fixed in 6.8.9.3 Q16 Mac OSX. I now get the following, which is not 0 as it should be, but different from above.

convert rose: -colorspace HSI -set colorspace sRGB rose.mpc
convert rose: -colorspace HSI -set colorspace sRGB rose.miff
compare -metric rmse rose.mpc rose.miff null:
75.6441 (0.00115426)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug miff vs mpc IM 6.8.9.2 Q16 Mac OSX

Post by magick »

MPC is saved to the quantum depth of the ImageMagick executable, whereas any other format is typically saved at the same depth as the input image. In your example, MPC is 16-bit whereas MIFF is 8-bit thus the non-zero RMSE is expected. To get a 0 RMSE, simply add -depth 16 to your command line.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug miff vs mpc IM 6.8.9.2 Q16 Mac OSX

Post by fmw42 »

Thanks for the explanation. That does indeed fix the issue.
Post Reply