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

java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds! in org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory.createFromImage

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: PDModel
    • Labels:
      None
    • Environment:
      PDFBox 20.RC2 (Oracle JDK 1.6 or Oracle JDK 1.7)

      Description

      method org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory.createAlphaFromARGBImage
      raise an exception on

      int[] pixels = alphaRaster.getPixels(0, 0,
                      alphaRaster.getSampleModel().getWidth(),
                      alphaRaster.getSampleModel().getHeight(),
                      (int\[]) null);
      

      when alphaRaster.getSampleModel().getWidth() or alphaRaster.getSampleModel().getHeight() is greater than image.getWidth() or image.getHeight() (e.g. when BufferedImage created by java.awt.image.BufferedImage.getSubimage)

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              clericip Paolo Clerici
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: