Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-alpha3
-
None
-
None
Description
The following snipped throws a NullPointerException:
Imaging.getICCProfile(FileUtils.readFileToByteArray(new File("NullPointer.jpg")));
Stacktrace:
Exception in thread "main" java.lang.NullPointerException at org.apache.commons.imaging.formats.jpeg.segments.App2Segment.getIccBytes(App2Segment.java:90) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getICCProfileBytes(JpegImageParser.java:294) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getICCProfileBytes(JpegImageParser.java:65) at org.apache.commons.imaging.Imaging.getICCProfileBytes(Imaging.java:404) at org.apache.commons.imaging.Imaging.getICCProfile(Imaging.java:347) at org.apache.commons.imaging.Imaging.getICCProfile(Imaging.java:318)