converting an Xmp.photoshop.DateCreated item into an Iptc.Application2.DateCreated item loses time information
Added by Linus Lee about 11 years ago
While using Exiv2 to fetch both Exif and Iptc data from XMP sidecar files, I found a problem. As I'm a newbie, maybe my guesses below can be wrong; please correct me if I'm wrong.
I think the problem arose because Xmp.photoshop.DateCreated is kind of aggregate data (which holds date and (optionally) time), whereas IPTC has two separate data: DateCreated and TimeCreated. It seems Exiv2 assumes there is one-to-one mapping from Xmp to Iptc, as the conversion table in convert.cpp implements.
Here's the context I'm talking about:
Iptcdatum::setValue()
Iptcdatum::operator=()
Converter::cnvXmpValueToIptc()
Converter::cnvFromXmp()
copyXmpToIptc()
XmpSidecar::readMetadata()
...
The "type" variable (of "TypeId" type) had a value of "date", which does not hold the time information.
I was wondering if this loss of time information is intended. If not, I was thinking that the conversion from Xmp to Iptc needs to create two IPTC data, if XMP data defines both date and time. Could somebody please give me some suggestions?
I'm attaching a sidecar XMP file I'm handling. Its Xmp.photoshop.DateCreated has both date and time information.
DSCF2642.xmp (4.75 KB) DSCF2642.xmp |