Just another Delphi programming port of call on the internet
CCR Exif Release History
Added UTF-8 support to TIPTCData when compiling under D2009 or later (specifically, IPTC’s 1:90 tag is both recognised and written out by default when IPTC data is created afresh).
XMP code rejigged again to (a) allow for the fact an XMP property need not share the namespace of its parent and (b) have ‘property-and-node elements’ read properly. Due to this, a couple enumeration types were renamed and NamespaceInfo properties added to TXMPProperty and TXMPSchema.
Fixed bug that meant the total size of very large JPEG segments wasn’t being calculated correctly.
A couple of tweaks on the theme of accepting malformed data.
A few other minor bug fixes.
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.
While the interface remains practically the same as before, the XMP handling code has been substantially rewritten, mainly for the sake of better supporting Adobe’s implementation —
TXMPPacket understands XMP properties written out as XML attributes.
TXMPPacket’s writing code now writes the packet out afresh (before, the original DOM structure was kept hold of and modified in place using the DOM API).
Changed the type of the RawXML property from DOMString to UTF8String and given it a setter.
Added OnLoadError event to TXMPPacket.
The TXMPPacket instance owned by a TCustomExifData object now only raises an EInvalidXMPPacket exception if its LoadFromStream or LoadFromFile methods are called explicitly.
Moved the CCRExifVersion constant to CCR.Exif.Consts.pas.
Removed the StreamHasXXXHeader routines, replacing them with HasXXX equivalents.
Thanks to Stefan Grube for helping ensure this release compiled correctly in D2009+.
Slight change to CCR.Exif.pas only: fixed implicit memory overwrite error in TCustomExifData.GetDetailsLongWord.
TCustomExifData now accepts Exif segments that declare themselves to be big endian when they are really small endian or vice versa.
elTrilinear renamed esTrilinear.
In the Exif List demo, replaced most of the string array constants with functions so as to prevent access violations when a tag value is out of its corresponding enumerated type’s range.
Completely removed the MakerNotePosition property from TExifData. Behaviour is now fixed to the old default (mpAuto), which is to stream out maker note data to their original location.
Added IPTC support —
Implemented an IPTC reader/writer class, TIPTCData, in a new unit, CCR.Exif.IPTC.pas.
At a lower level, the RemoveMetadataFromJPEG global routine can now delete IPTC data, and you can enumerate the data blocks of an Adobe APP13 segment from an IJPEGSegment instance.
TJPEGImageEx has received a few amendments —
Added an IPTCData property.
Added an overload to Assign that allows for the preservation of any metadata, interpreted by my code or not, when a bitmap is assigned.
Fixed a bug in which calling the regular Assign didn’t cause the ExifData property to be updated.
Two more Nikon maker note types now parsed. Thanks goes to Stefan Grube for updating the Exif List demo’s MakerNotes.ini for this.
Fixed bug of JPEG parsing code not realising a segment with a marker number of 0 has no data.
Fixed typo in TStreamHelper.ReadLongInt spotted by Jeff Hamblin.
Changed the types of the ExifImageWidth, ExifImageHeight and FocalLengthIn35mmFilm properties of TCustomExifData so as to give them MissingOrInvalid and AsString sub-properties. (Basically, they now use custom record types that have methods and operator overloads.)
Changed behaviour of TCustomExifData’s enumerator to now not skip empty sections.
The LoadFromJPEG methods of TExifData are now procedures rather than functions.
Added a couple more demos, namely an IPTC editor and a console app to strip specified types of metadata from one or more JPEG files.
Removed all previously deprecated symbols.
Sanity checks in the parser code and much better maker note support added.
ExifImageWidth and ExifImageHeight properties now can be either words or longwords.
Much better XMP support implemented (CCR.Exif.XMPUtils.pas, amongst other things, added).
EReadError (typically raised by TStream.ReadBuffer) is now trapped in one of the low-level loading routines so as to be ‘friendlier’ (to the end user!) when you attempt to load a corrupt Exif block. To be honest, I’m not massively keen on doing this, but anyhow, the change has been made.
Various other minor changes (see Release History.rtf in the ZIP for full details).