Closed cowwoc closed 3 years ago
This library doesn't interpret XMP data, it only extracts it. This is because the format of XMP doesn't fit with the directory/tag model used for all other kinds of metadata in the library. If you want to access XMP properties you can do so via the XmpDirectory
.
Closing for now. If I missed something, we can reopen.
I wasn't aware I could do this. Thank you!
For anyone else running across this issue, here is what worked for me:
XmpDirectory xmp = metadata.getFirstDirectoryOfType(XmpDirectory.class);
if (xmp != null)
{
XMPDateTime property;
try
{
property = xmp.getXMPMeta().
getPropertyDate(Schema.EXIF_SPECIFIC_PROPERTIES, "DateTimeOriginal");
}
catch (XMPException e)
{
throw new IOException(e);
}
if (property != null)
return property.getCalendar().getTime();
}
This issue might be related to https://github.com/drewnoakes/metadata-extractor/issues/118
I want to extract
photoshop:DateCreated
from an image with the following metadata:I have no idea what software/camera was used to generate this image. The image contains a photo of my child so I'm not really comfortable sharing it over Github. Hopefully the above metadata is enough for you to add support.
Also, for what it's worth
exiftool
parses this information intoCreateDate
. Per https://exiftool.org/forum/index.php?topic=8782.0 it sounds as if this is part ofXMP-photoshop:DateCreated
.