I'm just starting to explore the use of EXIF data, using the fpexif package.
The tutorial in the readme.txt file updates a tag with
imgInfo.ExifData.TagByName['UserComment'].AsString := 'My best photo'
and the example console_demo included with the package does similar things.
This fails with an access violation if the tag UserComment does not already exist - tested with
imgInfo.ExifData.TagByName['UserComment'] = Nil
Not many images - I'm concerned with .jpg mainly - have no instance (even a null one) of the UserComment tag, but enough do to make me want to add one where necessary.
I've tried various versions of the AddTag procedures without much success. So how can I add the tag to the image prior to setting its value?
TIA
Gordon
[SuSE Linux; Lazarus 3.4; fpc 3.2.2]