ImageEn, unit iexBitmaps

TIOParams.PNG_TextValues

TIOParams.PNG_TextValues


Declaration

property PNG_TextValues: TStringList;


Description

Contains the values associated with a list of keys (PNG_TextKeys property).

Note: PNG_TextKeys and PNG_TextValues must contain the same number of entries. Only uncompressed text is supported.


Example



Examples

// Add author and other text info to a PNG file
ImageEnView1.IO.Params.PNG_TextKeys.Add('Author');
ImageEnView1.IO.Params.PNG_TextValues.Add('Letizia');
ImageEnView1.IO.Params.PNG_TextKeys.Add('Subject');
ImageEnView1.IO.Params.PNG_TextValues.Add('Colosseo');
ImageEnView1.IO.SaveToFile('D:\output.png');

// Find the "Author" text key
idx := ImageEnView1.IO.Params.PNG_TextKeys.IndexOf('Author');
if idx >= 0 then
  ShowMessage( 'Author is ' + ImageEnView1.IO.Params.PNG_TextValues[idx] )
else
  ShowMessage( 'Author is Unknown' );

// read all text info from a PNG
for i := 0 to ImageEnView1.IO.Params.PNG_TextKeys.Count - 1 do
begin
  key := ImageEnView1.IO.Params.PNG_TextKeys[i];
  value := ImageEnView1.IO.Params.PNG_TextValues[i];
  Memo1.Lines.Add( key + ': ' + value );
end;