HI,
I have a command that was working to give the correct ressult, I have compiled the current version of ImageMagick and now it gives a wrong result.
The command converts a 32-bit floating point TIFF in which the values lie in the range 0-65535 into a 16-bit TIFF in which the values are the truncated integers. I need to use a self-compiled Q32 installation for this purpose.
The 'wrong result' looks like it's quantized to only 8 grayscale "colours" and randomly assigned values, the 'right result' has integers equal to the floating-point values but truncated.
Any help, what has changed?
Here is the command:
Code: Select all
convert -define quantum:format=floating-point projections/p_00000.tif -evaluate divide 65536.0 -define quantum:format=integer -depth 16 image_6897.tif
Code: Select all
$ convert -version
Version: ImageMagick 6.7.5-10 2012-03-05 Q32 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP HDRI
Code: Select all
convert -version
Version: ImageMagick 6.8.9-7 Q32 x86_64 2014-09-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC HDRI OpenMP
Delegates: bzlib fftw fontconfig freetype jng jpeg lcms pangocairo png tiff x xml zlib
I have had some discussion with Snibgo in Developer forum, and he has demonstrated to my satisfactino that the calcuations of the ImageMagick command are correct, and reading back the output files via
Code: Select all
compare -metric RMSE image_from_version_6.8.9.7.tif image_from_version_6.7.5.10.tif NULL
However the files are in fact different and display differently in ImageJ
Code: Select all
$ diff image_from_version_6.7.5.10.tif image_from_version_6.8.9.7.tif
Binary files image_from_version_6.7.5.10.tif and image_from_version_6.8.9.7.tif differ
ftp://ftpanon.diamond.ac.uk/I12JEEP/ForImageMagick/
The file names : ' input_image.tif ' , the input image , 32-bit IEEE float TIFF file
'image_from_version_####.tif' -- the output image when the command is run with the specified version (compiled here)
The file
image_from_version_6.7.5.10.tif
contains the image I require.
The file
image_from_version_6.8.9.7.tif
contains the peculiar result with only 8 different values distributed among the 65536 possible values in a way that is not obvious to me.
Why , and in what way, are 16-bit grayscale TIFF files different between 6.7.5-10 and 6.8.9-7 ??
Thanks!