GNOME Bugzilla – Bug 727270
Proposal to add gimp_metadata_set_from_iptc
Last modified: 2016-10-31 18:49:08 UTC
I am writing a GIMP file format plugin and would like to include support for loading Exif, XMP and IPTC metadata. What I am missing is a function for importing IPTC data into a GimpMetadata.
There are gimp_metadata_set_from_exif and gimp_metadata_set_from_xmp to parse raw Exif and XMP data. I propose adding a similar gimp_metadata_set_from_iptc to parse binary IPTC metadata.
I guess the implementation would be very similar to gimp_metadata_set_from_xmp.
These functions are actually used to parse metadata stored in old
GIMP XCF files. Parsing the metadata of other files would be the
job of [g]exiv2, what file format are we talking about?
Michael, I am talking about the JPEG XR format. Instead of trying to add JPEG XR support to exiv2 I'd rather just give the encoder the raw binary Exif, XMP and IPTC data. Likewise, the decoder already provides the three metadata types as raw data.
In my current implementation I use gimp_metadata_set_from_exif and gimp_metadata_set_from_xmp to hand the metadata to GIMP during decode. For encoding, gexiv2 currently lacks functions that would provide me the raw metadata (see https://mail.gnome.org/archives/gexiv2-list/2014-March/thread.html).
Any suggestions? The easiest solution for me would be to have gimp_metadata_set_from_(exif/xmp/iptc) and something like gimp_metadata_get_raw_(exif/xmp/iptc).
That sounds pretty reasonable. I still think that dealing with image
files is exiv2's job, but since a GIMP plug-in could potentially
do anything with the metadata, having a full exif/xmp/iptc data blob
get/set API seems like the right thing to do.
You can easily implement the setter by copying the exif or xmp function,
I haven't looked into getters yet, but by all means feel free to do
so and attach a patch :)
Christoph, did you figure out how to do this via exiv2?
exiv2 0.25 was released on June 21 2015 with a ton of new features and functions. If the functions needed are not included, please get in touch at http://dev.exiv2.org/projects/exiv2/boards and/or file a report and/or a patch at http://dev.exiv2.org/projects/exiv2/issues
Also, a patch to add the "raw binary blob set/get" API to GIMP would be nice :)
Bug #769820 just got a patch that implements this, resolving as
*** This bug has been marked as a duplicate of bug 769820 ***