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

Support saving to buffer #47

Open Ten0 opened 2 years ago

Ten0 commented 2 years ago

The current bindings only allow to save to a file. For our use case, we need to parse and remove exif tags in memory, for all kinds of images. => We would need to be able to save the resulting images (after removing tags), to a buffer (ideally using Write?).

It looks like this might be possible using https://gitlab.gnome.org/GNOME/gexiv2/-/blob/e4d65b31cd77f28ef248117e161de9d8cc31d712/gexiv2/gexiv2-metadata.cpp#L715 or https://gitlab.gnome.org/GNOME/gexiv2/-/blob/e4d65b31cd77f28ef248117e161de9d8cc31d712/gexiv2/gexiv2-metadata.cpp#L592, but is not currently available through the rust libraries.

felixc commented 2 years ago

That would be fantastically useful! Patches to expose gexiv2_metadata_save_stream (first via gexiv2-sys and then here) would be welcome.

yzernik commented 2 years ago

Anyone working on this? I might give it a try if no one else is.

felixc commented 2 years ago

Please go for it!

mexicantexan commented 10 months ago

@felixc @yzernik Would this work? -> https://github.com/felixc/gexiv2-sys/issues/26