ImageEn, unit iexMetaHelpers

TStringGridHelper.ReadGridFromIPTC

TStringGridHelper.ReadGridFromIPTC


Declaration

function ReadGridFromIPTC(IOParams : TIOParams; bReadOnly : Boolean = False) : Boolean; overload;
function ReadGridFromIPTC(const sFilename : string; bReadOnly : Boolean = False) : Boolean; overload;


Description

Fill a TStringGrid with the IPTC properties of the current image, or one loaded from file.
Two columns will be added with the left one containing property descriptions and the right one containing properties values. If the grid has a fixed row it will be given a heading of "Name" and "Value".
If bReadOnly is true the right-column will not be editable.
Result is true if the file has any IPTC fields.

Note: You may wish to call InitializeGrid before ReadGridFromIPTC to automatically assign the optimal layout to the grid.


Examples

// Display the IPTC properties of the current image
MyIPTCStringGrid.ReadGridFromIPTC( ImageEnView1.IO.Params );

// Read-only display of IPTC properties of a file
MyIPTCStringGrid.ReadGridFromIPTC( 'C:\MyImage.jpeg', True );