Class AcquisitionDateReader
Object
AcquisitionDateReader
Reads the image acquisition-date. from EXIF metadata, if specified in an image-file.
- Author:
 - Owen Feehan
 
- 
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<ZonedDateTime> readAcquisitionDate(com.drew.metadata.Metadata metadata) Reads an image acquisition-date from metadata, based on the present of EXIF data.static Optional<ZonedDateTime> readAcquisitionDate(Path path) Reads an image acquisition-date from a file identified by path, based on the present of EXIF data. 
- 
Method Details
- 
readAcquisitionDate
Reads an image acquisition-date from a file identified by path, based on the present of EXIF data.Only files with extensions matching JPEG or TIFF are checked.
Three different EXIF tags are tried in a particular order, and the first existing tag is treated as the acqusition date:
ExifDirectoryBase.TAG_DATETIMEExifDirectoryBase.TAG_DATETIME_ORIGINALExifDirectoryBase.TAG_DATETIME_DIGITIZED
- Parameters:
 path- the path to the image.- Returns:
 - the acquisition date, if it exists.
 - Throws:
 ImageIOException- if the metadata is errored (but not if metadata is absent).
 - 
readAcquisitionDate
Reads an image acquisition-date from metadata, based on the present of EXIF data.The same procedure is used as in
readAcquisitionDate(Path).- Parameters:
 metadata- the metadata.- Returns:
 - the acquisition date, if it exists.
 
 
 -