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 629044 - IPTC metadata removed when saving a JPEG image
IPTC metadata removed when saving a JPEG image
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.6.8
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2010-09-08 11:19 UTC by gerlos
Modified: 2013-10-27 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add dependency on libiptcdata, preserve IPTC metadata (13.85 KB, patch)
2011-09-17 23:29 UTC, David Lichterman
none Details | Review
same patch as before, except without a debug print i forgot to remove (13.55 KB, patch)
2011-09-17 23:44 UTC, David Lichterman
none Details | Review
JPG image file with IPTC data written by pyexiv2 (46.88 KB, image/jpeg)
2011-09-18 01:41 UTC, David Lichterman
  Details

Description gerlos 2010-09-08 11:19:51 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.
Comment 1 Sven Neumann 2010-09-08 19:53:16 UTC
Basically a duplicate of bug #56443.
Comment 2 gerlos 2010-09-09 08:22:21 UTC
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.
Comment 3 Marek 2011-06-08 20:53:50 UTC
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.
Comment 4 Michael Schumacher 2011-06-16 07:36:58 UTC
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.
Comment 5 David Lichterman 2011-09-17 23:29:05 UTC
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.
Comment 6 David Lichterman 2011-09-17 23:44:22 UTC
Created attachment 196852 [details] [review]
same patch as before, except without a debug print i forgot to remove
Comment 7 David Lichterman 2011-09-18 01:41:33 UTC
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.
Comment 8 Michael Schumacher 2013-01-19 21:50:32 UTC
Does this patch work in conjunction with the metadata plug-in, i.e. use the data from the xmp parasite of a XCF file?
Comment 9 Michael Natterer 2013-10-27 13:16:00 UTC
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