WriteComment example for Delphi
var
RasterIO: LEADRasterIO;
RasterVarStr: LEADRasterVariant;
begin
RasterIO:= CreateComObject (CLASS_LEADRasterIO) as LEADRasterIO;
RasterVarStr:= CoLEADRasterVariant.Create ( );
RasterVarStr.Type_:= VALUE_STRING;
RasterVarStr.StringValue:= 'Me';
//set the comment
RasterIO.Comment [CMNT_SZARTIST]:= RasterVarStr;
//write the comment into page 1 of TEST.TIF
RasterIO.WriteComment ( 'd:\pictures\TEST.TIF', 1 ) ;
//read the comment and display it
RasterVarStr:= RasterIO.ReadComment (LEADRasterView1.Raster,
'd:\pictures\TEST.TIF', 1, CMNT_SZARTIST);
ShowMessage ( RasterVarStr.StringValue );
end;