I have found something weird when trying to read XMP data, specifically aux:SerialNumber.
I have used both options for getting the serial number: IO.Params.XMP_AsStr[ XMP_Aux_SerialNumber]; This loads the serial number but does not yield an error for no serial, as documented.
IO.Params.Dict.GetString('aux:SerialNumber',true)); This loads the serial number but generates an error if no rating exists, as documented.
Both share the same problem:
I've attached three sample files. The Olympus.Small.JPG reports a serial number of 'BHG210742' which is correct. However if I load DMC-G7.small.jpg, it too reports that same serial number. This happens in my program and in your demo program if I use the setting for Standard ImageEn Properties. If either program opens a file from a G9 camera such as P1011263.small.jpg that seems to clear the problem and then DMC-G7 correctly reports no serial number.
I have tried the following code to clear the ImageEnView object between loading files:
Image1.ClearAll; Image1.IO.Params.ResetInfo();//clear all metadata //also Image1.IO.Params.ResetInfo([]);//clear all metadata Image1.IO.Params.ResetInfo([ierXMP]);//clear all XMP metadata //also Image1.IO.Params.XMP_Info := 'zzzzzzzzzz'; Image1.Update;
Nothing clears the XMP data except loading a G9 camera file. The Helpers in iexMetaHelpers setting in your demo program correctly handles reading the serial number.