kamadak / exif-rs

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

Support for PNG #12

Closed bitzl closed 3 years ago

bitzl commented 4 years ago

Are there any plans to support reading exif from PNG files (supported since PNG 1.2)? If you are interested, I might be even be able to contribute a PR.

kamadak commented 4 years ago

PNG 1.2 does not seem to support Exif, but Extension 1.5.0 does. I will consider supporting it. Do you have any use case in the wild?

mpfaff commented 4 years ago

I'm working on building a photo library web server that will need to be able to extract Exif data from multiple formats including PNG.

kamadak commented 4 years ago

PNG support has been committed and will be available in version 0.5.2.

Now, kamadak-exif directly supports PNG files, so the following information is not necessarily needed, but just FYI... Shortly after the commit, img-parts crate was mentioned in another issue. The next version of img-parts will extract the raw Exif data block from a PNG file, and then older kamadak-exif can be used to parse the raw Exif block.

In general, combining kamadak-exif with image container libraries is a basic strategy to read Exif information from image files that are not directly supported by kamadak-exif.