SaveWithStamp example for Delphi

This example saves the image in a JPEG file that includes a thumbnail (stamp) image. It then loads the thumbnail from the new file.

var
   sRet: Smallint;
   RasterIO: LEADRasterIO;
begin
   RasterIO := CreateComObject (CLASS_LEADRasterIO) as ILEADRasterIO;
   LEADRasterView1.ScaleMode:= 3; // Use pixels for sizing the thumbnail
   RasterIO.SaveWithStamp (LEADRasterView1.Raster, 'd:\Pictures\stamp.jpg',
                       FILE_JFIF, 24, 30, 150, 100, 24);
   RasterIO.LoadStamp (LEADRasterView1.Raster, 'd:\pictures\stamp.jpg');
   LEADRasterView1.ForceRepaint (sRet);
end;