GNOME Bugzilla – Bug 796285
Edits in Metadata Editor lost in export to jpeg
Last modified: 2018-05-24 20:12:23 UTC
Created attachment 372253 [details] Test images and screenshots I am using the Metadata Editor to add missing credit, copyright, source and description metadata. These edits all get lost on export (i.e. jpeg). They are missing in Exif and IPTC and XMP is completely empty (see screenshots in attachment). During testing I also ran into some further (minor) issues and added some screenshots (see attachment): - Special characters / utf8 (like "¾") is not handled properly - Copyright Status not saved - GPS: no decimal sec. accepted (i.e. 51deg 41' 25.5" 0deg 25' 03.3")
The EXIF specification never allow UTF-8 coding on many tags. If a data type of the tag is ASCII (0x0002), not allowed UTF-8 coding. Only can use UTF-8, when a data type is UNDEFINED (0x0007). Credit (Copyright and so on) tag is perhaps only used by ASCII, isn't it? My jpf file (gifted from my friend) with the credit tag is encoded by ASCII. (My country is Japan. The Japanese is multi byte code (using Unicode, etc.). But data is encoded ASCII style.) Therefore, GIMP must display the error message that can not using unicode characters. I think so.
Hi ShiroYuki_Mot, regarding the special characters / utf8 issue you might be right. But that is not related to the main issue: Edits (even ascii only) made with the Metadata Editor are lost on export. To reproduce: 1. Open any jpeg in GIMP 2. Open Image > Metadata > Edit Metadata 3. Enter some text in an empty field (like Credit Line, Source, Author, Copyright Line, etc.). 4. Click "Write Metadata" and optionally save the .xcf file. 5. Export to jpeg with "Save Exif data", "Save XMP data" and "Save IPTC data" all checked. 6. Open the exported jpeg. 7. Open the Metadata Viewer or Editor and see that the changes are lost.
Now, I tried on GIMP 2.10.2, installed by gimp-2.10.2-setup.exe (Official) The current version can not edit EXIF data. And it can handle XMP/ITPC data. the result seems like correctly. cf. XMP/ITPC raw data (added on creator and description) <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:iptcExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:plus="http://ns.useplus.org/ldf/xmp/1.0/" xmlns:GIMP="http://www.gimp.org/xmp/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" iptcExt:DigitalSourceType="http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture" xmpMM:DocumentID="gimp:docid:gimp:39423065-a609-40e5-b6be-fb14663cf91d" xmpMM:InstanceID="xmp.iid:baafc414-25fe-4a02-9eae-8127567db2ba" xmpMM:OriginalDocumentID="xmp.did:424a0442-b378-4c32-ae7b-90b40a530711" plus:ModelReleaseStatus="http://ns.useplus.org/ldf/vocab/MR-NON" GIMP:API="2.0" GIMP:Platform="Windows" GIMP:TimeStamp="1526986441359916" GIMP:Version="2.10.2" dc:Format="image/jpeg" xmp:CreateDate="2017-11-19T11:43:50.52" xmp:CreatorTool="GIMP 2.10"> <iptcExt:LocationCreated> <rdf:Bag/> </iptcExt:LocationCreated> <iptcExt:LocationShown> <rdf:Bag/> </iptcExt:LocationShown> <iptcExt:ArtworkOrObject> <rdf:Bag/> </iptcExt:ArtworkOrObject> <iptcExt:RegistryId> <rdf:Bag/> </iptcExt:RegistryId> <xmpMM:History> <rdf:Seq> <rdf:li stEvt:action="saved" stEvt:changed="/metadata" stEvt:instanceID="xmp.iid:2599a43b-012b-4bb1-9fd2-9845516da6b0" stEvt:softwareAgent="Gimp 2.10 (Windows)" stEvt:when="2018-05-22T19:53:32"/> <rdf:li stEvt:action="saved" stEvt:changed="/" stEvt:instanceID="xmp.iid:961f2325-a287-4704-b811-34aecef66df0" stEvt:softwareAgent="Gimp 2.10 (Windows)" stEvt:when="2018-05-22T19:54:01"/> </rdf:Seq> </xmpMM:History> <plus:ImageSupplier> <rdf:Seq/> </plus:ImageSupplier> <plus:ImageCreator> <rdf:Seq/> </plus:ImageCreator> <plus:CopyrightOwner> <rdf:Seq/> </plus:CopyrightOwner> <plus:Licensor> <rdf:Seq/> </plus:Licensor> <dc:creator> <rdf:Seq> <rdf:li>type="Seq" Shiroyuki_Mot</rdf:li> </rdf:Seq> </dc:creator> <dc:description> <rdf:Alt> <rdf:li xml:lang="x-default">C58</rdf:li> </rdf:Alt> </dc:description> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?>
Dear Per Egil Roksvaag. If you need to edit/add EXIF tags, the current version may be a bit un-powerful. Please refer to my comment 3 . (Sorry, 'ITPC' is wrong. mistaken. 'IPTC' is correct.)
I've installed the newest version 2.10.2 and tried again, but this issue is still unresolved. When I enter (ascii only) text into empty fields (author, description, etc.) using the Metadata Editor, the metadata is saved to XMP in the .xcf file. But the metadata it is still lost on EXPORT to jpeg. When I open the EXPORTED .jpg file with GIMP, The XMP tab is completely empty, even if "Save XMP data" was checked on export. The IPTC and Exif tabs have some data, but not the changes made with the Metadata Editor in the .xcf file (except GPS). Did you follow the steps 5. - 7. in my last comment? GPS with decimal seconds (i.e. 51deg 41' 25.5") is still not working.
OK, I've done some more testing... and this issue seems to occur when the imported .jpg file already contains XMP metadata. So this could possibly be a (Photoshop?) compatibility issue. Imported (Photoshop?) metadata and metadata added with the GIMP Metadata Editor don't seem to mix well. So my first step to reproduce should be: "Open a .jpg file with existing Photoshop XMP metadata in GIMP." I've uploaded a .jpg file with Photoshop XMP metadata as a test case. I tried to work around this issue by exporting without metadata first, then reimport, add all metadata from scratch with the Metadata Editor and then export with metadata again. The added metadata is displayed in the Metadata Viewer XMP tab as expected, but not in the IPTC tab (or Exif tab as you noted), even for metadata entered in the IPTC tab (Credit Line, Source, Usage Terms). Sadly, my Wordpress CMS system only support IPTC and Exif metadata, so the workaround doesn't work for me.
Created attachment 372351 [details] jpeg with existing XMP metadata
Dear Per Egil Roksvaag. I am reading your reply. On my case (Comment 3), The tested jpg file has no XMP data at all at first. So, GIMP may work correctly. (Ref.; in my comment, raw data is encoding by UTF-8. Can be using UTF-8, perhaps on XMP. ... I never try it... ) Many software handle the only own metadata (XMP). They define the special tagged data. This particular famous case is Microsoft Explorer's property on OS (Windows). ex.; Rating. (the rating is appear many times, on one file, because of many software was tagging this. But almost software shows only own tagging or limited items only. ... the hidden items exist!) The current version of GIMP may have some trouble on overwriting the existed XMP data or on showing this. Note; I saw your jpg file. (Comment 7) (Oh! It's a good camera and lens!!!) Normally, xpacket size (length) equals from 4000 to 8000. (?) But Your sample jpg has 13452! (Big! ... :) ) To the developers! Please see this case!
Adding information, on comment 7. If you have Nikon's ViewNX-i, then please look at XMP/IPTC of this jpg file from that. I think that it will not be displayed by Nikon official software.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/1485.