Bug 964254 - gimp eats my XMP metadata (metadata parasite seems to be corrupt)
Summary: gimp eats my XMP metadata (metadata parasite seems to be corrupt)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gimp
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-17 16:28 UTC by Matthew Miller
Modified: 2016-10-16 20:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-14 11:11:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Before edit in gimp (228.26 KB, image/jpeg)
2013-05-21 17:44 UTC, Matthew Miller
no flags Details
After open in gimp and export to jpg (222.86 KB, image/jpeg)
2013-05-21 17:45 UTC, Matthew Miller
no flags Details
Original Camera JPEG (2.37 MB, image/jpeg)
2014-11-18 12:20 UTC, Enski Boski
no flags Details
Gimp created JPEG (1.98 MB, image/jpeg)
2014-11-18 12:22 UTC, Enski Boski
no flags Details
batch file for gimp command-line mode (1.82 KB, text/plain)
2014-11-18 12:26 UTC, Enski Boski
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 746958 0 None None None 2016-10-14 11:11:29 UTC

Description Matthew Miller 2013-05-17 16:28:25 UTC
I'm using geeqie to add Subject tags and Titles to my JPEG files. If I later edit one of these files in Gimp and overwrite, the metadata is lost, even though I checked the option to save XMP data.

The console has errors like this:

Metadata parasite seems to be corrupt
While parsing XMP metadata:
Error on line 57 char 1: Nested elements (<rdf:Bag>) are not allowed in this context

** (file-jpeg:3579): WARNING **: JPEG - unable to decode XMP metadata packet
While parsing XMP metadata:
Error on line 58 char 1: End of element <exif:Flash> not expected in this context

gimp-2.8.4-3.fc19.x86_64

Comment 1 Nils Philippsen 2013-05-21 15:18:28 UTC
Matt, would you please attach an image file which exhibits the problem, i.e. has such an additional tag? Thanks.

Comment 2 Matthew Miller 2013-05-21 17:44:39 UTC
Created attachment 751332 [details]
Before edit in gimp

Comment 3 Matthew Miller 2013-05-21 17:45:53 UTC
Created attachment 751333 [details]
After open in gimp and export to jpg

Comment 4 Matthew Miller 2013-05-21 17:51:23 UTC
Added before and after images.

It's possible that it's actually Geeqie (and exiv2) in the wrong; after the edit it (or just exiv2 directly) says:

Error: XMP Toolkit error 203: Duplicate property or field node
Warning: Failed to decode XMP metadata.


but exiftool works fine.

Comment 5 Matthew Miller 2014-11-02 17:36:06 UTC
Still in gimp-2.8.14-1.fc22.x86_64

Comment 6 Enski Boski 2014-11-18 12:18:40 UTC
GIMP appears to create this bug itself ...
A picture directly from a camera, does not have the problem. Once the file has been loaded into GIMP, and then exported as a JPEG (using command-line batch mode)
The resulting saved JPEG image demonstrates the above problem if subsequently reloaded into GIMP, with following errors ...

While parsing XMP metadata:
Error on line 43 char 1: End of element <exif:Flash> not expected in this context
While parsing XMP metadata:
Error on line 57 char 1: End of element <exif:Flash> not expected in this context

Metadata parasite seems to be corrupt

Using ...

localhost:Test.dir> gimp -v
GNU Image Manipulation Program version 2.8.14
git-describe: GIMP_2_8_12-2-ge62e6fe
using GEGL version 0.2.0 (compiled against version 0.2.0)
using GLib version 2.42.1 (compiled against version 2.41.5)
using GdkPixbuf version 2.31.1 (compiled against version 2.31.1)
using GTK+ version 2.24.22 (compiled against version 2.24.22)
using Pango version 1.36.7 (compiled against version 1.36.7)
using Fontconfig version 2.11.1 (compiled against version 2.11.1)
using Cairo version 1.12.16 (compiled against version 1.12.16)

Attachments for original, processed images and batch file script to follow

Comment 7 Enski Boski 2014-11-18 12:20:57 UTC
Created attachment 958542 [details]
Original Camera JPEG

Comment 8 Enski Boski 2014-11-18 12:22:44 UTC
Created attachment 958543 [details]
Gimp created JPEG

This JPEG demonstrates the bug

Comment 9 Enski Boski 2014-11-18 12:26:12 UTC
Created attachment 958544 [details]
batch file for gimp command-line mode

script file run from command line using
> gimp -i -b '(batch-jpeg-resize "*.jpg" '$QUALITY' )' -b '(gimp-quit 0)

Comment 10 Jaroslav Reznik 2015-03-03 14:56:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 11 Jan Kurik 2015-07-15 14:47:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 12 Nils Philippsen 2016-10-14 11:11:29 UTC
I think I've found a corresponding bug upstream and it doesn't look well for existing stable versions of GIMP.

https://bugzilla.gnome.org/show_bug.cgi?id=746958#c15

"I think we can all agree about metadata being totally broken in 2.8,
probably unfixably broken. ..."

As I understand it, GIMP on the master branch, i.e. the version that is slated to become 2.10 eventually, has a different metadata implementation that shouldn't show this problem, but the upstream reporter hasn't tested this yet.

Matt and Enski, can you test this with either git master of gimp (ideally), or the gimp-unstable package from my COPR (which is version 2.9.4)?

https://copr.fedorainfracloud.org/coprs/nphilipp/gimp-unstable/

You can then post your results here, or upstream. I'll close the bug as UPSTREAM, because I don't see how I can fix this here ;).

Comment 13 Matthew Miller 2016-10-16 20:00:58 UTC
I can't test your Copr right now because there are no F25 builds, but I tried the nightly Flatpak, which is 2.9.4 (build becd85e), and that appears to... entirely destroy all EXIF and XMP metadata. So.... I'll have to find a nightly build of master, I guess, to figure it out.


Note You need to log in before you can comment on or make changes to this bug.