Resolution Decimal Value Floored for Photoshop TIFF

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
jcampbell
Posts: 1
Joined: 2013-02-27T13:07:19-07:00
Authentication code: 6789

Resolution Decimal Value Floored for Photoshop TIFF

Post by jcampbell »

We've been asked to start recording "Print Size" for TIFFs that are uploaded and shortly after we started saving the Print Size from identify, we were told that a few of the values were wrong. Via these forums, I found out that the print size is a calculated value from Geometry and Resolution. Further investigation revealed that the values for Resolution are being floored.

I've made my two example images available here:
http://remindermedia.com/images/uploads ... ortest.tif
http://remindermedia.com/images/uploads ... stGIMP.tif

In the example, my errortest.tif reports a print size of 3x3.99746 with a resolution of 262.667x262.667 in GIMP/Photoshop. However, identify returns 262x262:

Code: Select all

[jcampbell@itdesktop3 Downloads]$ nice -n 10 identify -verbose -format "%G %[resolution.x]x%[resolution.y]" -quiet "errortest.tif" 
788x1050 262x262
I know of there are issues with Photoshop profiles and IPTC data, so I reexported the same file from GIMP and identify returns the correct resolution for that file.

Code: Select all

[jcampbell@itdesktop3 Downloads]$ nice -n 10 identify -verbose -format "%G %[resolution.x]x%[resolution.y]" -quiet "errortestGIMP.tif" 
788x1050 262.667x262.667
When I remove the -quiet flag, there are warnings for the Photoshop file but I don't know if they're related.

Code: Select all

[jcampbell@itdesktop3 Downloads]$ nice -n 10 identify -verbose -format "%G %[resolution.x]x%[resolution.y]" "errortest.tif" 
identify: ASCII value for tag "Model" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/768.
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/768.
identify: ASCII value for tag "Model" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/768.
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/768.
788x1050 262x262
Is there anything I can do to get the correct print size for the Photoshop created TIFFs? Any help or insight is appreciated in advance.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Resolution Decimal Value Floored for Photoshop TIFF

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.2-7 Beta available by sometime tomorrow. Thanks.
Post Reply