ImageEn, unit iexMetaHelpers |
|
TStringGridHelper.WriteGridToIPTC
Declaration
function WriteGridToIPTC(IOParams : TIOParams) : Boolean; overload;
function WriteGridToIPTC(const sFilename : string) : Boolean; overload;
Description
Write the changes made by a user to IPTC values in a TStringGrid (which was filled using
NewGridForIPTC or
ReadGridFromIPTC) to the current image or an image file.
Result is true if any changes were made to the IPTC properties (i.e. a result of false means the TStringGrid IPTC content matches the file).
Notes:
- For first overload, only the
TIOParams is updated, the changes are not saved to file.
- For the second overload, the file must already exist! If no changes were made to the IPTC data then the file is not modified
Examples
// Write changes to IPTC properties of the current image, and ask if the user wants to save changes if any fields were modified
if MyIPTCStringGrid.WriteGridToIPTC( ImageEnView1.IO.Params ) then
PromptToSaveFile;
// write IPTC changes to a file
MyIPTCStringGrid.WriteGridToIPTC( 'D:\MyImage.jpeg' );