Skip to content

ExifUtil.getExifOrientation does not work for images containing other exif data alongwith Orientation #108

@datsabk

Description

@datsabk

314

Expected behavior

Give orientation for all the images with whatever exif data being present

Actual behavior

Currently it accepts only the images which contains EXIF data of orientation alone.
It gives exception
javax.imageio.IIOException: JFIF APP0 must be first marker after SOI
at com.sun.imageio.plugins.jpeg.JPEGMetadata.(Unknown Source)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.getImageMetadata(Unknown Source)
at net.coobird.thumbnailator.util.exif.ExifUtils.getExifOrientation(Unknown Source)
at com.abk.ImageAutoRotate.main(ImageAutoRotate.java:24)

Steps to reproduce the behavior

Use any images taken using a mobile phone and you will face issues
Attached the image for which it gives exception

Environment

JDK 8

  • OS vendor and version:Windows 7
  • JDK vendor and version: JDK 8 - Downloaded from Oracle.com
  • Thumbnailator version: 0.4.8

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions