Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-264

BMP Parser physicalWidthDpi and physicalHeightDpi truncated before rounding off.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-alpha2
    • 1.0-alpha3
    • Format: BMP
    • None

    Description

      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);

      Attachments

        Activity

          People

            kinow Bruno P. Kinoshita
            rampravin Ram
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h