gimp xcf v011: Truncated metadata in exiftool 11.30

Started by quickshot, April 12, 2019, 01:31:41 PM

Previous topic - Next topic

quickshot

Realizing that my aged exiftool (10.68) cannot handle GIMP's current XCF file format, I downloaded 11.30 (for Windows) to give it a try.
Unfortunately that version has major problems with reading the XCF metadata (for no obvious reason):
The output of exis tool was:
[...]
MIME Type                       : image/x-xcf
XCF Version                     : 11
Image Width                     : 1080
Image Height                    : 864
Color Mode                      : RGB Color
Compression                     : RLE Encoding
X Resolution                    : 300
Y Resolution                    : 300
Tattoo                          : 3
Units                           : Inches
Metadata Tag Name               : Exif.GPSInfo.GPSAltitude
Metadata Tag                    : 0

(That's it!)

When loading the file in Emacs, I can see themetadata block like this:
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
  <tag name="Exif.GPSInfo.GPSAltitude">0/10</tag>
  <tag name="Exif.GPSInfo.GPSLatitude">0/1 0/1 0/1</tag>
  <tag name="Exif.GPSInfo.GPSLongitude">0/1 0/1 0/1</tag>
  <tag name="Exif.Image.BitsPerSample">8 8 8</tag>
  <tag name="Exif.Image.ImageLength">864</tag>
  <tag name="Exif.Image.ImageWidth">1080</tag>
  <tag name="Exif.Image.ResolutionUnit">2</tag>
  <tag name="Exif.Image.XResolution">300/1</tag>
  <tag name="Exif.Image.YResolution">300/1</tag>
  <tag name="Xmp.dc.description">lang=&quot;x-default&quot; Ambiente Beleuchtungsmessung Gl  hbirne Philips R39 30W</tag>
  <tag name="Xmp.dc.title">lang=&quot;x-default&quot; Beleuchtungsmessung Gl  hbirne 30W Spektrum
</tag>
  <tag name="Xmp.iptcExt.DigitalSourceType">http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture</tag>
  <tag name="Xmp.plus.ModelReleaseStatus">http://ns.useplus.org/ldf/vocab/MR-NON</tag>
  <tag name="Xmp.xmpMM.DocumentID">gimp:docid:gimp:5c68107b-3c9d-4a41-bca2-88eb934d42c0</tag>
  <tag name="Xmp.xmpMM.History[1]/stEvt:action">saved</tag>
  <tag name="Xmp.xmpMM.History[1]/stEvt:changed">/metadata</tag>
  <tag name="Xmp.xmpMM.History[1]/stEvt:instanceID">xmp.iid:8ecd34d2-5d0c-4896-90a4-9a8f6413c26a</tag>
  <tag name="Xmp.xmpMM.History[1]/stEvt:softwareAgent">Gimp 2.10 (Windows)</tag>
  <tag name="Xmp.xmpMM.History[1]/stEvt:when">2019-04-09T23:06:15</tag>
  <tag name="Xmp.xmpMM.InstanceID">xmp.iid:e1880455-f63d-45c3-b696-5866e0824748</tag>
  <tag name="Xmp.xmpMM.OriginalDocumentID">xmp.did:ba366662-459d-43cc-a776-9f7593db2bf6</tag>
</metadata>

So where is the rest? (Note: There exists a bug report for GIMP on encoding umlauts (like 'ü') incorrectly (https://gitlab.gnome.org/GNOME/gimp/issues/3007), hoping that is not the reason for this issue)

StarGeek

#1
What was the command you used?  Does the output change when you add the -a (duplicates) option?

My first guess is that this is a FAQ #3a problem. 
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

quickshot

Sorry for not responding earlier: Using the latest version, it's still the same (with just option "-e"), but using "-a" I see more metadata.
Just wondering whether it wouldn't make sense to emit a warning when "-a" would output more information...

herb

Hello Phil, hello quickshot.

please allow that I ask an additional question to display of all tags:

I downloaded the attached *.xcf file and displayed all metadata using Exiftool version 11.98 in Windows 7 Dos-box.

For each available xml-tag I see 2 lines as given in the following section of output:
Metadata Tag Name               : Exif.GPSInfo.GPSAltitude
Metadata Tag                    : 0


But using also option -struct:
exiftool.exe -all:all -struct -g0:1 <file>
gives different output formats:
e.g.:
(1) only lines "Metadata Tag Name" and no lines "Metadata Tag" and in addition one line "Metadata" formatted as a structure object as given as follows
Metadata Tag Name               : Exif.GPSInfo.GPSAltitude
Metadata                        : {Tag={Name=Exif.Image.XResolution}}
Metadata Tag Name               : Exif.GPSInfo.GPSLatitude


(2) the expected 2 lines for allmost all xml-tags, but for one xml-tag the line "Metadata Tag" is missing and its value is displayed with line "Metadata"
Metadata Tag Name               : Exif.Image.XResolution
Metadata Tag                    : 300
Metadata Tag Name               : Exif.Image.YResolution
Metadata                        : {Tag=300}


I also see many many warnings like
Warning                         : [minor] Error 3 placing :metadataTag in structure or list
Warning                         : [minor] Error 3 placing :metadataTagName in structure or list


These are the typical outputs I have seen when using option -struct.
I do not have any "golden rule" what must be done in order to get a specific output.
For me both formats are not a proper output.

Best regards
Herb

Phil Harvey

Hi Herb,

ExifTool does not really support reading arbitrary XML.  As a hack, I throw it at the XMP decoder, but that really isn't ideal, and the effect of the -struct option on this XML is not defined.

Ideally I should add support for the GIMP-format XML data in XCF files, but I haven't done this yet.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).