Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-alpha1, 1.1, 1.x
Description
Width: 3509
Physical Width Dpi: 4650
Physical Width Inch: 1169.667
Height: 2481
Physical Height Dpi: 4650
Physical Height Inch: 827.00024
TiffImageParser.java (196): - case 3: // Meter - unitsPerInch = 0.0254; + case 3: // Centimeter + unitsPerInch = 2.54; (c) http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf TiffImageParser.java (218): - physicalWidthDpi = (int) (XResolutionPixelsPerUnit / unitsPerInch); + physicalWidthDpi = (int) Math.round(XResolutionPixelsPerUnit * unitsPerInch); TiffImageParser.java (226): - physicalHeightDpi = (int) (YResolutionPixelsPerUnit / unitsPerInch); + physicalHeightDpi = (int) Math.round(YResolutionPixelsPerUnit * unitsPerInch);
After this patch I got correct values:
Width: 3509
Physical Width Dpi: 300
Physical Width Inch: 11.69667
Height: 2481
Physical Height Dpi: 300
Physical Height Inch: 8.2700024
May be need to patch writing of tiff image too - don't know.
P.S. GIMP show values: 300,000, 300,000, 11,697, 8,270.