jrpcguru |
Posted - Aug 22 2014 : 14:45:17 I have identified a possible bug in ImageEn version 5.1.1
My program uses ImageEn for scanning and is written in Delphi XE2. It also allows editing photos. In both cases the purpose is to input various dscriptive data and store it in IPTC fields. The major description field, up to 2,000 characters, is stored with this command:
ImageEnView1.IO.Params.WriteIPTCField(PhotoShop_IPTC_Records, IPTC_PS_Caption, IPTCCaption.Text);
This worked fine for a batch of photos that needed major descriptive details last Nov. More recently I changed my program so that it flagged the file as having been edited via this program when inputting this IPTC data. I did it as follows:
ImageEnView1.IO.Params.EXIF_XPComment := 'Edited by: ' + ExtractFileName(Application.ExeName) + ' Ver ' + jrProgramVersionInfo() + ' using ImageEn version ' + ImageEnView1.ImageEnVersion;
The actual save was performed as follows: ImageEnView1.IO.InjectJpegIPTC(ImageFileName); ImageEnView1.IO.InjectJpegEXIF(ImageFileName);
After a few days I discovered that this procedure was corrupting portions of the makers notes. For example:
Correct maker notes: Lens serial number = 12101551279 Lens type = LUMIX G VARIO 12-35/F2.8
Maker notes after injecting Exif data: Lens serial number = ªªëªbªªâªª«ªª Lens type = ªêª«¢ªº¦«ª¨¨ºªºŠªªj*«ªêª«Jªª¢
A variety of maker notes tags are corrupted, but not any contiguous blocks of tag numbers.
I have now confirmed that if I do not inject Exif data, this corruption does not happen.
I changed my program to store the editing program information as follows: ImageEnView1.IO.Params.WriteIPTCField(PhotoShop_IPTC_Records, IPTC_PS_Instructions, ExtractFileName(Application.ExeName) + ' Ver ' + jrProgramVersionInfo() + ' using ImageEn version ' + ImageEnView1.ImageEnVersion);
And now I just inject IPTC data. The maker notes are not corrupted by this approach.
J.R. |