Closed hagsteel closed 6 years ago
As a hacky workaround I removed thumbnail
from here: https://github.com/kamadak/exif-rs/blob/master/src/tiff.rs#L141 and it works
Maybe that will provide some insight into where it's going wrong as well.
Thank you for the report. The CR2 file contains additional (raw and other) images after the primary/thumbnail ones. The Exif information is located within the primary image, so I guess the extra images can be safely ignored.
Temporary patch: https://github.com/kamadak/exif-rs/commit/9bc14f6e868b5c09be7fcf2f2d41bdc95027d9d3
Removing thumbnail
is not safe, because a crafted file can cause an infinite recursion without the check.
Fixed in version 0.3.1.
Trying to read exif data from a Canon CR2 file and get this error:
Here is an example CR2 file: https://www.imaging-resource.com/PRODS/canon-1dx/E1DXINBI000050.CR2.HTM
I'm using
kamadak-exif = "0.3.0"
Steps to replicate:
/tmp/E1DXINBI000050.CR2
kamadak-exif = "0.3.0"
to Cargo.tomlcargo run
Here is some code to replicate the error:
Update: let me know if you need any more info or if there is something else I can do to help with this. I don't have a direct understanding of the EXIF format to try to solve this my self
Tried this with a Nikon NEF file and that works fine so it's only the Canon CR2 format so far