Page 1 of 1

convert to txt not working on floating point?

Posted: 2014-08-30T12:06:47-07:00
by deklund
I tried using convert to text with a 16 bit int tiff file, it worked fine and the output values were as expected. Not so when I tried doing the same thing on a 32 bit float tiff. I thought this might be caused by the bit depth, so I converted to 16 bit depth and viewed the file (a ramp) to confirm ImageMagick had processed it correctly. I tried using convert to text on the 16 bit file, but I'm getting nonsense data. The file is an RGB ramp with increasing values from left to right, but when I read out a row, all the values are coming out the same #1F721F721F72.

Don

Re: convert to txt not working on floating point?

Posted: 2014-08-30T12:11:43-07:00
by fmw42
Not sure if this will help, but see the -define for tiff floating point and -depth.

"To specify a single-precision floating-point format, use -define quantum:format=floating-point. Set the depth to 64 for a double-precision floating-point format"

see
http://www.imagemagick.org/script/formats.php
http://www.imagemagick.org/script/comma ... php#define

You may have to work in Q32 or HDRI IM compile.

Or it could be a bug in IM or a bad TIFF file? I do not know enough to say.

Re: convert to txt not working on floating point?

Posted: 2014-08-30T12:17:16-07:00
by snibgo
The question is rather vague.

Please give the actual commands you used so other people can try them.

Please also state the version of IM, Q-number and whether using HDRI. And platform.

Re: convert to txt not working on floating point?

Posted: 2014-08-30T13:34:30-07:00
by deklund
Sorry, in preparing a sample to share I found the problem was mine. The image was matted and i had not noticed.