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 719522 - gimp: DwC (Darwin Core) XMP metadata is not visible.
gimp: DwC (Darwin Core) XMP metadata is not visible.
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal normal
: 2.10
Assigned To: Gexiv2 Maintainers
Gexiv2 Maintainers
: 719623 (view as bug list)
Depends on:
Blocks: 118202
 
 
Reported: 2013-11-29 00:30 UTC by Alan Pater
Modified: 2014-02-09 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample image with Darwin Core XMP metadata (52.29 KB, image/jpeg)
2013-11-29 00:30 UTC, Alan Pater
Details
gexiv2-dump output of DwC-SampleImage.jpg (20.00 KB, application/octet-stream)
2014-02-04 23:00 UTC, Jim Nelson
Details

Description Alan Pater 2013-11-29 00:30:11 UTC
Created attachment 263085 [details]
Sample image with Darwin Core XMP metadata

Open the sample DwC (Darwin Core) image in the Gimp. I tested with version 2.9.1 

Go to Image > Image Metadata > XMP tab.

DwC metadata is not visible.

Some image viewers, such as eog & gthumb can see the DwC metadata in this image. 

Exiftool can read, edit and write DwC tags.


Notes: Darwin Core (DwC) is a XMP metadata standard used for sharing
biodiversity information. http://rs.tdwg.org/dwc/
Comment 1 Alan Pater 2013-11-29 00:38:32 UTC
I should add a bit more about DwC. It is specialized, but provides quite a lot of data that would otherwise be kept in a separate database rather then in the image metadata.

The specific project I am lucky enough to be involved in is a wildlife camera trap project in the Amazon. (See the January 2013 National Geographic) They have 55,000 photos taken over the last several years.

There are 170 specialized tags in the DwC standard, some highly relevant ones for this project are:

-RecordBasisOfRecord - human observation? photo?
-EventHabitat - jungle? swamp?
-OccurrenceEstablishmentMeans - how did the animal get there, is it native to the area? introduced?
-OccurrenceBehavior - what is the animal doing
-OccurrenceIndividualCount - how many animals appear in the photo
-OccurrenceIndividualID - if the animal can be uniquely identified
-OccurrenceLifeStage - adult, juvenile
-OccurrenceSex - male, female
-TaxonScientificName - Scientific name of the animal
-TaxonVernacularName - Common names for the animal

Perhaps not very relevant to your typical photographer, but very important for researchers cataloging species and biodiversity.

The full list of tags is here: http://rs.tdwg.org/dwc/terms/index.htm
Comment 2 Michael Natterer 2013-11-29 00:42:01 UTC
Confirmed, seems to be a problem in gexiv2/exiv2. This is the output
while loading the file:

** (file-jpeg:9194): WARNING **: Unsupported time format

and then a gazillion of:

** (lt-gimp-2.9:9161): WARNING **: No namespace info available for XMP prefix `dwc'
Comment 3 Michael Natterer 2013-12-01 00:14:19 UTC
*** Bug 719623 has been marked as a duplicate of this bug. ***
Comment 4 Jim Nelson 2013-12-04 20:06:19 UTC
Darwin Core is being discussed on the Exiv2 dev's forum: http://dev.exiv2.org/boards/3/topics/1675  At this point I don't believe this is a gexiv2 per se, rather a problem inside of Exiv2.

I've filed a formal ticket for DwC support at http://dev.exiv2.org/issues/937
Comment 5 Alan Pater 2013-12-09 07:17:22 UTC
Agreed that changes are needed inside exiv2 to provide full read/write support for DwC and I've added some details to that ticket.

But, I understand that exiv2 can pass throuh XMP metadata that it does not have the schema for. For example, gthumb can display the raw DwC metadata and there is a patch to allow digikam to display it as well: https://bugs.kde.org/show_bug.cgi?id=328018
Comment 6 Alan Pater 2013-12-26 23:38:05 UTC
I can report that support for DwC in exiv2 is coming along, I have write support working, it just does not display the results as nicely as I would like, so I have some more work to do on it.

http://dev.exiv2.org/issues/937#note-19
Comment 7 Alan Pater 2014-01-03 01:21:00 UTC
Well, my exiv2 work is not coming along as well as I thought. It looks like no one has implemented a XMP namespace using a nested structure in exiv2 and DwC is a nested namespace. Other nested namespaces, such as IPTC Core, are implemented with a flat structure in exiv2 while they are implemented as nested namespaces in exiftool.

Perhaps a real coder (unlike myself) could take a look and figure out how to implement nested namespaces in exiv2?
Comment 8 Alan Pater 2014-02-04 15:45:20 UTC
My patch to exiv2 is working for me, but I still cannot see any DwC XMP metadata in Shotwell or in the Gimp.

I'm not enough of "a seasoned developer" to figure out if gexiv2 in it's current form is stripping out the DwC XMP fields or if the user apps are doing that. Is there a test command or script that I could run that would show what gexiv2 is doing?

PS: The patch to exiv2 can be found here: http://dev.exiv2.org/issues/937

And a PPA with a build of exiv2 + DwC is here: https://launchpad.net/~alan-pater/+archive/dwc
Comment 9 Jim Nelson 2014-02-04 23:00:20 UTC
Alan, Shotwell doesn't have any facilities today for displaying all Exiv2 metadata in the UI.  I can't speak for GIMP, I haven't tried their latest builds.

What I have done is included a new utility command-line tool in gexiv2 that should be able to help you.  It's in commit 7d687ba in master.  To use it, you need to pull the latest and then:

$ ./autogen.sh
$ ./configure --enable-tests
$ make
$ make tests

This will build test/gexiv2-dump.  (Note that you must have a recent version of Vala installed to build it.)  You can then run:

$ test/gexiv2-dump image.jpg

This will dump the image file's Exiv2 tags and their interpreted string values to stdout.

I tried it with the DwC-SampleImage.jpg and received what looked to be proper output, including Darwin Core tags, but I suspect without your patch the DwC tags are not being properly listed/handled.  For example, I'm seeing tags like this:

Xmp.dwc.dctermsLocation/dwc:continent

Since the output is so long, I've attached it as a file.  Also, it prints this warning when it starts:

** (process:10130): WARNING **: Unsupported time format

I'm not sure at this time where this is coming from, but don't think it's an immediate impediment to your testing.
Comment 10 Jim Nelson 2014-02-04 23:00:53 UTC
Created attachment 268108 [details]
gexiv2-dump output of DwC-SampleImage.jpg
Comment 11 Alan Pater 2014-02-05 00:23:32 UTC
Great, thanks a lot Jim!

I'll test with my patch to make sure, but it looks like gexiv2 is seeing all the DwC tags correctly. The long, nested names are how things look through exiv2, even with my patch, so that is not an error on the part of gexiv2, it's just how nested tags work with exiv2.
Comment 12 Alan Pater 2014-02-06 02:06:48 UTC
So gexiv2 can see DwC metadata regardless, just like exiv2 can.

So with my patch to exiv2 the question becomes: 

       Can apps or scripts write DwC tags through gexiv2?

Is there some basic script laying around that can test writing tags?
Comment 13 Alan Pater 2014-02-06 19:42:30 UTC
Jim, great news. gexiv2 does not have any problem reading and writing DwC metadata.

I tested with the Photini metadata editor. I just changed a couple of it's writable tags to DwC ones and successfully wrote them to a test image.

This was with exiv2 0.23 + my DwC patch & the unmodified gexiv2 that comes with Ubuntu 14.04 (Trusty).
Comment 14 Michael Natterer 2014-02-06 20:22:46 UTC
Why is this bug back with GIMP now? I thought gexiv2 reads/writes it nicely
now. GIMP adds nothing on top of gevix2.
Comment 15 Jim Nelson 2014-02-06 20:30:43 UTC
Michael, I guess the question is, does GIMP display the DwC metadata?  If GIMP is merely listing all tags/values it finds in the image, then I think this ticket is closed.  There's a sample image with a lot of DwC at bug #723794 for testing.

Alan, are there any plans to document DwC on Exiv2's tag reference, i.e. http://exiv2.org/metadata.html?

I've ticketed the "Unsupported time format" bug at bug #723794.  At this point I don't think this is an impediment to closing this ticket.
Comment 16 Michael Natterer 2014-02-06 20:41:03 UTC
Yes GIMP simply lists all tags it gets from gexiv2. And even if we should
add special treatment for certain tags or tag groups, I guess we will
always have a raw view that shows them all.

Closing as FIXED.
Comment 17 Michael Natterer 2014-02-06 20:41:23 UTC
Oh and thanks for taking care of this :)
Comment 18 Alan Pater 2014-02-06 22:35:57 UTC
Jim,  my patch to exiv2 includes the documentation for the DwC tags. That should show up on the exiv2 site when 0.25 is released, assuming my patch makes it in that release.

Michael, you're right, GIMP is now showing all the DwC tags from the sample image. 

Thanks guys!