GNOME Bugzilla – Bug 629044
IPTC metadata removed when saving a JPEG image
Last modified: 2013-10-27 13:16:00 UTC
When we save or "save as" a JPEG image containing IPTC metadata, that metadata is lost. GIMP seems to remove IPTC metadata from the saved JPEG. This problem is annoying since programs like digikam use IPTC metadata for organizing images (eg. for adding tags). We need to keep IPTC metadata when saving JPEG images.
Basically a duplicate of bug #56443.
I you mean that GIMP needs to preserve metadata in general, it's a duplicate. But I don't think so, since in that bug people is talking mostly about EXIF metadata and not about IPTC metadata. At the moment, GIMP can preserve EXIF and XMP metadata on JPEG images (so, job done), but not IPTC metadata (missing feature to do). This is why I opened this bug.
Agree, when saving jpg file, EXIF data is correctly preserved, yet IPTC metadata is lost. In my photographic workflow I user RawTherapee to convert raw files to jpgs, it automatically adds metadata (author, copyright, etc). I use GIMP just to do sharpening as RawTherapee cannot do that selectively. So from my point of view I do just a minor edit in GIMP, but hey GIMP strips the most important data from my file. Please do preserve IPTC tags, when saving edited jpg files. Please note, this is not a duplicate of #56443.
This is related to bug 61499 - the IPTC data isn't loaded from the file at all, and that bug is mostly about loading metadata and representing it as an XMP model internally.
Created attachment 196851 [details] [review] Add dependency on libiptcdata, preserve IPTC metadata hopefully i made the patch properly. I tested this with a jpg that had IPTC metadata and with one that didn't. Metadata was preserved and no other regressions noted.
Created attachment 196852 [details] [review] same patch as before, except without a debug print i forgot to remove
Created attachment 196859 [details] JPG image file with IPTC data written by pyexiv2 JPG image with IPTC data for testing. I own the rights to the image, so it's kosher.
Does this patch work in conjunction with the metadata plug-in, i.e. use the data from the xmp parasite of a XCF file?
Fixed in master: commit 21bed1e2fb438fa5721bddb0573a724ae0024455 Author: Hartmut Kuhse <onkelhatti@gimp.org> Date: Sat Oct 19 18:38:01 2013 +0200 Completely rewrite metadata handling using gexiv2 Based on original patches from Hartmut Kuhse and modified by Michael Natterer. Changes include: - remove libexif dependency and add a hard dependency on gexiv2 - typedef GExiv2Metadata to GimpMetadata to avoid having to include gexiv2 globally - add basic GimpMetadata handling functions to libgimpbase - add image and image file specific metadata functions to libgimp, including the exif orientation image rotate dialog - port plug-ins to use the new APIs - port file-tiff-save's UI to GtkBuilder - add new plug-in "metadata" to view the image's metadata - keep metadata around as GimpImage member in the core - update the image's metadata on image size, resolution and precision changes - obsolete the old metadata parasites - migrate the old parasites to new GimpMetadata object on XCF load