You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bruno P. Kinoshita (Jira)" <ji...@apache.org> on 2020/08/19 13:37:00 UTC
[jira] [Updated] (IMAGING-264) BMP Parser physicalWidthDpi and
physicalHeightDpi truncated before rounding off.
[ https://issues.apache.org/jira/browse/IMAGING-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bruno P. Kinoshita updated IMAGING-264:
---------------------------------------
Assignee: Bruno P. Kinoshita
> BMP Parser physicalWidthDpi and physicalHeightDpi truncated before rounding off.
> --------------------------------------------------------------------------------
>
> Key: IMAGING-264
> URL: https://issues.apache.org/jira/browse/IMAGING-264
> Project: Commons Imaging
> Issue Type: Bug
> Components: Format: BMP
> Reporter: Ram
> Assignee: Bruno P. Kinoshita
> Priority: Minor
>
> In BMPImageParser class, the values are typecasted to int before rounding off so output varies(other parsers has this logic correct).
> int physicalWidthDpi = (int)((double)bhi.hResolution * 0.0254D);
> int physicalHeightDpi = (int)((double)bhi.vResolution * 0.0254D);
>
> Expected :
> int physicalWidthDpi = (int)*Math.round*((double)bhi.hResolution * 0.0254D);
> int physicalHeightDpi = (int)*Math.round*((double)bhi.vResolution * 0.0254D);
--
This message was sent by Atlassian Jira
(v8.3.4#803005)