ImageEn, unit iexMetaHelpers

TListViewHelper.WriteListToIPTC

TListViewHelper.WriteListToIPTC


Declaration

function WriteListToIPTC(IOParams : TIOParams) : Boolean; overload;
function WriteListToIPTC(const sFilename : string) : Boolean; overload;


Description

Write the changes made by a user to IPTC values in a TListView (which was initialized using NewListForIPTC or ReadListFromIPTC) 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 TListView IPTC content matches the file).

NOTE: A standard TListView does not permit editing of subitems, so either download a TListView descendent that allows editing, or search for code snippets for "Edit Subitems TListView"

Other 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 MyIPTCListView.WriteListToIPTC( ImageEnView1.IO.Params ) then
  PromptToSaveFile;

// write IPTC changes to a file
MyIPTCListView.WriteListToIPTC( 'D:\MyImage.jpeg' );