Converting TIF makes it unreadable.

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
walfridson
Posts: 3
Joined: 2011-01-14T09:38:21-07:00
Authentication code: 8675308

Converting TIF makes it unreadable.

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting TIF makes it unreadable.

Post 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?
walfridson
Posts: 3
Joined: 2011-01-14T09:38:21-07:00
Authentication code: 8675308

Re: Converting TIF makes it unreadable.

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

Re: Converting TIF makes it unreadable.

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting TIF makes it unreadable.

Post by magick »

Add -define quantum:format=floating-point to your command line:
  • convert original.tif -define quantum:format=floating-point image.tif
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting TIF makes it unreadable.

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting TIF makes it unreadable.

Post 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).
walfridson
Posts: 3
Joined: 2011-01-14T09:38:21-07:00
Authentication code: 8675308

Re: Converting TIF makes it unreadable.

Post by walfridson »

Thanks guys!
Will try your suggestion
Post Reply