I’ve put up a slight revision on my Exif and IPTC parsing code. The changes aren’t drastic —
- Tweaked default behaviour of file name variants of TCustomExifData.SaveToJPEG and TIPTCData.SaveToJPEG to write to a memory stream first. This protects against the case of when the file exists, but is not a valid JPEG file (before, the file would just get wiped on the exception being raised).
- Added EnsureEnumsInRange property to TCustomExifData. When True (the default), enumeration tag property values will definitely be in the declared range — if the stored value is otherwise, it will be reported as missing unless you get at the raw data directly.
- Slightly modified TXMPPacket.TryLoadFromStream to support ExifTool’s not-quite-XMP XML dump format.
As before, it can be downloaded from CodeCentral here.