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

Set default params in JBIG2Filter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.8, 1.8.9, 2.0.0
    • 1.8.9, 2.0.0
    • Rendering

    Description

      Currently JBIG2Filter does not set read params. This causes noise because jbig2-imageio logs this before using default params (e.g. see this comment). This patch explicitly uses the default params, which would solve that:

      Index: pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java
      ===================================================================
      --- pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java      (revision 1650041)
      +++ pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java      (working copy)
      @@ -85,7 +85,7 @@
                   BufferedImage image;
                   try
                   {
      -                image = reader.read(0);
      +                image = reader.read(0, reader.getDefaultReadParam());
                   }
                   catch (Exception e)
                   {
      

      Attachments

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              dbr Daniel Bonniot de Ruisselet
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: