Page 1 of 1

Converting TIF makes it unreadable.

Posted: 2011-01-14T09:51:31-07:00
by walfridson
Hi
I'm using ImageMagick-6.6.7-Q16-windows.zip
I'm trying to convert the following tif: http://walen.se/temp/test.rar
convert.exe c:/test.tif -limit area 0 -resize 512 c:/test2.tif
I'm unable to open test2.tif in photoshop, any ideas? doing a identify gives correct info of test2.tif

Re: Converting TIF makes it unreadable.

Posted: 2011-01-14T10:45:12-07:00
by magick
Perhaps Photoshop cannot handle images @ 32-bits per pixel. Add -depth 16 to your command line to produce a TIFF image with 16 bits per sample. Can Photoshop read that image?

Re: Converting TIF makes it unreadable.

Posted: 2011-01-19T03:18:09-07:00
by walfridson
Yes Photoshop fully support 32 bit. The original file is made in photoshop in 32bit.

32 bit from convert also causes problems to renderman tx format in some cases.
Converting directly from the 32bit photoshop tiff works fine but I need convert.exe to resize.

For example:
Following rar contains both the photoshop tiff and the result after calling "convert.exe from to"
http://walen.se/temp/images.rar

The one from convert.exe fails to open in photoshop and produce a black tx from renderman txmake

Thanks

Re: Converting TIF makes it unreadable.

Posted: 2011-01-19T11:52:12-07:00
by fmw42
To work with IM for 32-bit images, you need either Q32 compile (for 32-bit integers) or better HDRI so that your images support 32-bit positive and negative floats. Your PS image format may not be compatible with your IM Q 16 level compile, which won't support 32-bit images. In HDRI you need to use TIFF and may have to set the quantum:format see http://www.imagemagick.org/Usage/formats/#tiff

Re: Converting TIF makes it unreadable.

Posted: 2011-01-19T16:11:38-07:00
by magick
Add -define quantum:format=floating-point to your command line:
  • convert original.tif -define quantum:format=floating-point image.tif

Re: Converting TIF makes it unreadable.

Posted: 2011-01-19T16:31:57-07:00
by fmw42
magick wrote:Add -define quantum:format=floating-point to your command line:
  • convert original.tif -define quantum:format=floating-point image.tif
Magick,

Just for my own education, does this mean you can create/convert to 32-bit TIFF format with Q16 IM or does one also need Q32 or HDRI? If so, is the 32-bit Tiff positive integers only or does it allow negatives and or fractional values?

Or is your command above just allowing one to read the 32-bit TIff, but convert it to 16 bits on a Q16 IM?

Fred

Re: Converting TIF makes it unreadable.

Posted: 2011-01-19T16:34:39-07:00
by magick
32-bit TIFF is supported with ImageMagick Q16 and Q8. However, as expected, if HDRI is not enabled, the values are quantized to the number of supported levels (e.g. 0..65535 for Q16).

Re: Converting TIF makes it unreadable.

Posted: 2011-01-21T09:55:38-07:00
by walfridson
Thanks guys!
Will try your suggestion