New revision of CCR Exif (0.9.6)

Another revision of CCR Exif is up. Changes:

  • Some documentation added, albeit only in the form of a PDF file.
  • Fixed potential data corruption bug in TJpegImageEx.SaveToStream. As part of this fix, whereas before, a specific JFIF segment was always written out, now nothing is touched (including the JFIF segment — even if missing) other than any existing Exif segment.
  • Added SaveToJPEG method to TExifData. Calling this will replace any Exif metadata in the specified JPEG file with what is currently defined by the TExifData object. In combination with the existing LoadFromJPEG method, this provides a more flexible way of editing existing Exif metadata than that provided by TExifDataPatcher. (Note that you could have got similar behaviour before if you had used TJpegImageEx instead of TExifData directly.) The old caveat about MakerNote data still remains though.
  • Added RemoveExifDataFromJPEG global routine, which takes either a file name or a TJPEGImage instance as its parameter and returns True if there were Exif data to remove.
  • Fixed TExifData.SaveToStream so that it now saves GPS and/or Interop sections (doh!). Nonetheless, they are only written out if they have any tags. So, say you load into an TExifData instance data that includes GPS info, call Clear on the esGPS section, and save out again; doing this will remove the GPS sub-IFD from actual file. Now, this behaviour will only save six bytes compared to writing out an empty IFD or sub-IFD. Nonetheless, it is aesthetically quite pleasing I think, and matches how the thumbnail IFD isn’t (and never was) written out when Thumbnail.Empty returns True.
  • Partly due to rewriting the saving code, partly due to a change of heart, the CanSafelySaveTag, GetTagsToSave, SaveSave and OnCanSafelySaveTag members of TExifData have been removed.
  • In TCustomExifData, the ResolutionUnit, XResolution and YResolution properties have been replaced with a single Resolution property, with the FocalPlaneResolutionUnit, FocalPlaneResolutionX and FocalPlaneResolutionY properties replaced with FocalPlaneResolution. In the course of doing this, I fixed a bug of erroneously assuming the two sets of properties shared the same section.
  • The ColorSpace property on TCustomExifData has changed its type from Word to a new word-sized enumeration (TExifColorSpace).
  • Setting a tag or tag element to its current value is now much less likely to cause the container object to have its Modified property set to True.
  • Added TagExists function to TExifSection.
  • Added MissingOrInvalid function to TExifFlashInfo.
  • More complete implementation of TExifFlashInfo.Assign.
  • You can now remove tags from a TExifDataPatcher instance. Because of this, TCustomExifData now publicly exposes the Clear method, and TExifSection has acquired Remove and Clear from TExtendableExifSection, with ClearTag being deleted.
  • Added testing mode to Exif List and JPEG Dump demos — pass the /test switch as a parameter to the EXE. Done mainly to test the revised saving code in TExifData, though it demonstrates the latter’s new SaveToJPEG method I suppose…
  • Thanks to Valerian Kadyshev for suggestions that were partly implemented in this release, along with David Hoyle again for a few more bug reports.

One thought on “New revision of CCR Exif (0.9.6)

  1. Pingback: CCR Exif documentation « Delphi Haven

Comments are closed.