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

ImageIOUtil.WriteImage creates huge PNG images when used with default quality on jdk11

    XMLWordPrintableJSON

Details

    Description

      tallison@apache.org pointed us to a build failure in Tika on jdk11. The cause may be different .PNG files - I noticed that PNG files saved with ImageIOUtil.write() are huge when done with default quality on jdk12 / 13, which is 1. In the past (jdk8 and before) that parameter had no effect for PNG files but apparently no more.

      Thus I'll set compressionQuality to 0 to ensure maximal compression. PNG is a lossless format so there is no risk.

      Todo:

      • use flexible default value
      • mention in Javadoc
      • change command line tool PDFToImage
      • change one test

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: