Page 1 of 1

Resolution Decimal Value Floored for Photoshop TIFF

Posted: 2013-02-27T13:32:03-07:00
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.

Re: Resolution Decimal Value Floored for Photoshop TIFF

Posted: 2013-02-27T13:57:22-07:00
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.