AutoTrim example for Delphi
This example trims the bitmap with threshold of 10.
procedure TForm1.Button1Click(Sender: TObject);
var
sRet: Smallint;
RasterProc: ILEADRasterProcess;
begin
RasterProc:= CreateComObject (CLASS_LEADRasterProcess ) as ILEADRasterProcess;
RasterProc.AutoTrim (LEADRasterView1.Raster, 10);
LEADRasterView1.ForceRepaint (sRet);
end;