I am converting images to thumbnail with this version 0.4.8.
The test code is below:
ImageInputStream input = ImageIO.createImageInputStream("d:/test.jpg");
ImageReader reader = ImageIO.getImageReaders(input).next();
reader.setInput(input, true, true);
Orientation orientation = ExifUtils.getExifOrientation(reader, 0);
Expected getting and orientation object or null object.
Actual behaviorBut I got:
java.lang.NullPointerException
at net.coobird.thumbnailator.util.exif.ExifUtils.readIFD(Unknown Source)
at net.coobird.thumbnailator.util.exif.ExifUtils.getOrientationFromExif(Unknown Source)
at net.coobird.thumbnailator.util.exif.ExifUtils.getExifOrientation(Unknown Source)
Steps to reproduce the behavior
In mothed readIFD of ExifUtils.java, the thread got the value of type is 10, but In class IfdType has not value "10" . Occording to the specification "CIPA DC-008-2012"(http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf)
, the value of IfdType.SROTIONAL should be 10. But in source code, it is SRATIONAL(5, SLONG.size() * 2).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4