Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-113

Cannot read multipage tiff

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-alpha1
    • 1.0-alpha1
    • None

    Description

      I get the error below when I'm trying to read a multipage tiff file as a list of images
      final List<BufferedImage> images = Imaging.getAllBufferedImages(new File(imageLocation));

      line 589 of TiffImageParser

      Rectangle subImage = checkForSubImage(params); //if the params is null it will crash

      java.lang.NullPointerException
      at org.apache.commons.imaging.formats.tiff.TiffImageParser.getIntegerParameter(TiffImageParser.java:513)
      at org.apache.commons.imaging.formats.tiff.TiffImageParser.checkForSubImage(TiffImageParser.java:531)
      at org.apache.commons.imaging.formats.tiff.TiffImageParser.getBufferedImage(TiffImageParser.java:589)
      at org.apache.commons.imaging.formats.tiff.TiffDirectory.getTiffImage(TiffDirectory.java:163)
      at org.apache.commons.imaging.formats.tiff.TiffImageParser.getAllBufferedImages(TiffImageParser.java:499)
      at org.apache.commons.imaging.Imaging.getAllBufferedImages(Imaging.java:1210)
      at org.apache.commons.imaging.Imaging.getAllBufferedImages(Imaging.java:1202)
      at TestWriteTiffImages.main(TestWriteTiffImages.java:30)

      Attachments

        Activity

          People

            Unassigned Unassigned
            acostil Adrian Costil
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: