Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed reading EXIF of a WebP image #473

Closed
PearlPig123 opened this issue May 8, 2020 · 4 comments
Closed

Failed reading EXIF of a WebP image #473

PearlPig123 opened this issue May 8, 2020 · 4 comments
Labels
format-exif format-webp image-queue Actionable issue with sample image

Comments

@PearlPig123
Copy link

Hi, I got a TiffProcessingException when running:
Metadata webpMetadata = WebpMetadataReader.readMetadata(imgStream);

The stacktrace is as below:
com.drew.imaging.tiff.TiffProcessingException: Unclear distinction between Motorola/Intel byte ordering: 17784
at com.drew.imaging.tiff.TiffReader.processTiff(TiffReader.java:60)
at com.drew.metadata.exif.ExifReader.extract(ExifReader.java:87)
at com.drew.metadata.exif.ExifReader.extract(ExifReader.java:77)
at com.drew.metadata.exif.ExifReader.extract(ExifReader.java:71)
at com.drew.metadata.webp.WebpRiffHandler.processChunk(WebpRiffHandler.java:76)
at com.drew.imaging.riff.RiffReader.processRiff(RiffReader.java:87)
at com.drew.imaging.webp.WebpMetadataReader.readMetadata(WebpMetadataReader.java:58)

The WebP image I used is: https://drive.google.com/file/d/1HW9N0lS0VQWqC7_WD6fCxPJ102fYqnTv/view?usp=sharing
It is a JPEG originally and I converted it to WebP using ImageMagick commandline for testing purpose.

@drewnoakes drewnoakes added format-exif format-webp image-queue Actionable issue with sample image labels May 8, 2020
@drewnoakes
Copy link
Owner

Thanks for the report. Firstly, would you be willing and able to grant permission to add this image to https://github.com/drewnoakes/metadata-extractor-images for regression testing purposes?

@PearlPig123
Copy link
Author

Thanks for the report. Firstly, would you be willing and able to grant permission to add this image to https://github.com/drewnoakes/metadata-extractor-images for regression testing purposes?

Yes, feel free to add it.

@drewnoakes
Copy link
Owner

@JieyingXu thank you, I'll add the image.

Pushed a fix to master. Thanks for the bug report.

drewnoakes added a commit to drewnoakes/metadata-extractor-dotnet that referenced this issue May 8, 2020
Some WebP files seem to have the JPEG Exif preamble. It may be an error,
but it's safe to recover from it.

Fixes the .NET side of drewnoakes/metadata-extractor#473.
drewnoakes added a commit to drewnoakes/metadata-extractor-images that referenced this issue May 8, 2020
@PearlPig123
Copy link
Author

@JieyingXu thank you, I'll add the image.

Pushed a fix to master. Thanks for the bug report.

@drewnoakes May I ask how can I depend on this fix if it is not released yet? I am using maven to inject metadata-extractor into my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format-exif format-webp image-queue Actionable issue with sample image
Projects
None yet
Development

No branches or pull requests

2 participants