After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727270 - Proposal to add gimp_metadata_set_from_iptc
Proposal to add gimp_metadata_set_from_iptc
Status: RESOLVED DUPLICATE of bug 769820
Product: GIMP
Classification: Other
Component: libgimp
git master
Other All
: Normal enhancement
: 2.10
Assigned To: GIMP Bugs
Depends on:
Reported: 2014-03-28 21:44 UTC by chbugzilla
Modified: 2016-10-31 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description chbugzilla 2014-03-28 21:44:40 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.
Comment 1 Michael Natterer 2014-03-28 23:51:38 UTC
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?
Comment 2 chbugzilla 2014-03-29 19:47:32 UTC
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

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).
Comment 3 Michael Natterer 2014-03-30 00:17:08 UTC
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 :)
Comment 4 Alan Pater 2015-06-25 11:52:47 UTC
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 and/or file a report and/or a patch at
Comment 5 Michael Natterer 2015-06-25 13:13:12 UTC
Also, a patch to add the "raw binary blob set/get" API to GIMP would be nice :)
Comment 6 Michael Natterer 2016-10-31 18:49:08 UTC
Bug #769820 just got a patch that implements this, resolving as

*** This bug has been marked as a duplicate of bug 769820 ***