[OpenJDK 2D-Dev] <OpenJDK 2D-Dev> Review request for JDK-7182758: BMPMetadata returns invalid PhysicalPixelSpacing
Jayathirth D V
jayathirth.d.v at oracle.com
Thu Oct 8 08:49:30 UTC 2015
Hello All,
Please review following fix in jdk9:
Bug : https://bugs.openjdk.java.net/browse/JDK-7182758
Webrev : http://cr.openjdk.java.net/~rchamyal/jay/7182758/webrev.00/
Bug : BMPMetadata returns invalid PhysicalPixelSpacing
Root cause : Whenever XPixelsPerMter or YPixelsPerMeter is more than value 1 in BMP header. Horizontal & Vertical Physical pixel spacing were returned as zero.
In getStandardDimensionNode() method of BMPMetadata.java we are dividing 1 by XPixelsPerMter/ YPixelsPerMter. When
XPixelsPerMter/ YPixelsPerMter is more than 1. Resulted value is stored without decimal part, which resulted in zero.
Solution : Made changes to how Horizontal & Vertical Physical pixel spacing is calculated so that decimal value is not truncated.
Thanks,
Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20151008/c9429d26/attachment.html>
More information about the 2d-dev
mailing list