Extend exif <> iptc <> xmp conversions
|Status:||Assigned||Start date:||04 Apr 2015|
|Category:||metadata||Estimated time:||25.00 hours|
The exiv2 manpage has examples of syncing and converting metadata between XMP, IPTC, and EXIF using the -i and -e options. The list of properties converted are listed in convert.cpp along with functions such as cnvFromXmp and syncExifWithXmp.
I propose that these functions be extended to include other desirable conversions such as those in the Metadata Working Group guidelines and those in common usage. MWG guidelines, for example, recommend that keys with the same information be mapped together.
Description: Exif.Image.ImageDescription | Iptc.Application2.Caption | Xmp.dc.description
Creator: Exif.Image.Artist | Iptc.Application2.By-line | Xmp.dc.creator
DateTimeOriginal: Exif.Photo.DateTimeOriginal && Exif.Photo.SubSecTimeOriginal | Iptc.Application2.DateCreated && Iptc.Application2.TimeCreated | Xmp.photoshop.DateCreated
DateTimeDigitized: Exif.Photo.DateTimeDigitized && Exif.Photo.SubSecTimeDigitized | Iptc.Application2.DigitizationDate && and DigitalCreationTime | Xmp.xmp.CreateDate
There are other mappings recommended and in common use that should be part of this update.
So what do you think team? Would you volunteer to help me in this project?
#1 Updated by Robin Mills almost 2 years ago
I didn't know we did those conversions. Somebody asked about this earlier in the week: http://dev.exiv2.org/boards/3/topics/1974
There are samples that do conversions. Nobody's ever asked about this before - so I've never had reason to look into this. I nobody volunteers to help you, I will. I you specify what's to be done, I'll do the code. However if anybody else volunteers, I'm happy to not become involved.
#2 Updated by Alan Pater almost 2 years ago
Yes, I saw that topic which reminded me that I had seen those conversion functions. My quick test indicates that they won't currently do what was requested there, but I could be mistaken.
I can definitely work on the specification on what I believe needs to be done to get us there.
Thanks for taking the time out your vacation to respond!
#3 Updated by Robin Mills almost 2 years ago
- File Swan.jpg added
No, Thank You for stepping into this. We've been for a great day out in Peak District National Park and I saw your message when I got back to where we are staying. I went for a little sleep and when I awake - you've stepping into the case.
This is wonderful. The project makes progress while I'm asleep. I'll assign this to you. When you require me to do something, assign this to me.
#5 Updated by Alan Pater almost 2 years ago
Onwards and upwards Robin!
I've dug in a bit more and discovered that the existing conversion functions already handle a lot of MWG mapping guidelines. For MWG compliance it appears we don't need to do anything with Keywords, Description, Orientation, Copyright, Creator. And I have just added conversions for Rating.
I think the next step is the various Date/Time properties. These come in all kinds of different formats. EXIF has separate keys for subSec times, IPTC has separate keys for Date & Time, XMP merges everything into a single key. Sometimes we find that applications have written them incorrectly. This is where I am challenged.
By the way, the commands I used are as follows:
exiv2 -eX image.jpg exiv2 -iX image.jpgThe original image.jpg contained only exif metadata. The 1st command exports to an XMP sidecar file with the exif keys mapped to IPTC and XMP. The 2nd command imports the data from the sidecar file. image.jpg then contains the metadata in EXIF, IPTC, and XMP. There could be a way to do it all in one step, no?
#6 Updated by Alan Pater almost 2 years ago
- % Done changed from 0 to 70
The conversions to Xmp.photoshop.DateCreated and Xmp.xmp.CreateDate are complete. What is missing are the conversions to IPTC Date and IPTC Time. Those are separate keys, so the input datetime needs to be divided into date and time.
#8 Updated by Alan Pater 8 months ago
- Assignee deleted (
- Target version changed from 0.26 to 0.27
- Estimated time set to 25.00
I propose that these conversions be moved to an external sample program. My reasoning is that these conversions are unexpected behaviour when trying to create a simple XMP sidecar file using "exiv2 -eX".