Posterize example for Delphi

This example applies a six-color poster effect and redisplays the image.

var
   sRet: Smallint;
   RasterProc: LEADRasterProcess;
begin
   RasterProc:= CreateComObject(CLASS_LEADRasterProcess)as LEADRasterProcess;
   RasterProc.Posterize (LEADRasterView1.Raster, 6);
   LEADRasterView1.ForceRepaint (sRet);
end;