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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • PDModel
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment