Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1975

Improve TestImageIOUtils unit tests to check image resolution and compression

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.5, 2.0.0
    • Fix Version/s: 1.8.5, 2.0.0
    • Component/s: Utilities
    • Labels:

      Description

      Because of the problems with recent changes (see PDFBOX-1963), I will improve the unit tests so that image resolution and compression is checked.

      I found out that JPEGs don't have a resolution, BMP had the wrong resolution. The fault wasn't in the java TIFF writer as I thought before, it is in the java PNG writer, which uses the PixelSize values wrongly, i.e. it interprets them as "pixels per mm" instead of "mm per pixel" as per specification. The JPEG writer throws an exception "JFIF APP0 must be first marker after SOI". The BMP writer can set the resolution, but the BMP reader doesn't read it.

      (Some of this might be different depending on the version)

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: