felixc / rexiv2

Rust library for read/write access to media-file metadata (Exif, XMP, and IPTC)
GNU General Public License v3.0
79 stars 17 forks source link

Preview images #33

Closed Naarakah closed 5 years ago

Naarakah commented 5 years ago

An implementation for https://github.com/felixc/rexiv2/issues/20 with thumbnails and preview images. I have decided to load the image only when needed (get_data() and save_to_file()), and to unload it just after, so the API is not duplicated like in gexiv2 (gexiv2_preview_properties_get_width() vs gexiv2_preview_image_get_width() for example).

felixc commented 5 years ago

Thank you! Like with the other PR, I apologize for the CI breakage. I have fixed it now, and if you rebase this PR onto the latest master, things should be passing again.

Your PR also makes use of anonymous lifetimes, which broke the CI for the "oldest supported rustc version". However, I think upgrading to the 2018 edition of the language is a good idea anyway, so I've updated the minimum required rustc to 1.31, which means your code is now good to go!

felixc commented 5 years ago

Thank you so much for this major contribution! These are really useful features that I'd been hoping for for a long time.

I've merged them in in https://github.com/felixc/rexiv2/commit/5efd64c4855a5c6e8fac31e7c1f4220ecde6a716 and https://github.com/felixc/rexiv2/commit/2aa2cfad8ed63043329646e4a5c35d13c12741f9 and am in the process of cutting a new release that will include them (v0.8.0). Like with the last PR, GitHub doesn't recognize the commits as matching this PR (and therefore will show this PR as "closed" rather than "merged") because I had to rebase and merge in some other changes — but this PR is in fact merged.

Thank you again!

felixc commented 5 years ago

I've released https://github.com/felixc/rexiv2/releases/tag/v0.8.0 with these enhancements!