Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
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)