I am trying to write a method which sets the date/time stamp of a given JPG file. This is what I have so far:
procedure TFrmSetDate.SetDateTimeForFile(AFileName: string; ADateTime: TDateTime);
ImageEnView := TImageEnView.Create(nil);
ImageEnView.IO.Params.EXIF_DateTime2 := ADateTime;
ImageEnView.IO.Params.EXIF_DateTimeOriginal2 := ADateTime;
First question: this doesn't appear to work. The new date and time are not written to the file. What am I doing wrong?
Second question: after running this method, the updated file is about 1/3 of its original size. Why is this and how can I update the file so that it is unchanged other than the date and time?