kamadak / exif-rs

Exif parsing library written in pure Rust
BSD 2-Clause "Simplified" License
190 stars 42 forks source link

Invalid TIFF byte order after upgrading to 0.5.1 from 0.3.1 #14

Closed rschulman closed 4 years ago

rschulman commented 4 years ago

After upgrading my exif dependency to 1.5.1 from 0.3.1, photos that used to be parsed successfully are now generating errors saying "Invalid TIFF Byte Order" when my program calls read_raw. I've used the linux exif CLI tool on my test photo and it does not show any errors on the same file. I can find a way to share the file if that would be useful.

rschulman commented 4 years ago

I realize what the problem was. I didn't understand that read_raw was intended to only take the bytes making up the EXIF fields itself and I was giving it an entire jpg. I switched to using read_from_container and it now works. Sorry for the noise.

duguying commented 1 year ago

I realize what the problem was. I didn't understand that read_raw was intended to only take the bytes making up the EXIF fields itself and I was giving it an entire jpg. I switched to using read_from_container and it now works. Sorry for the noise.

that's great, it's helpful. i use it for wasm.