Did you try CastColorRange or CastColor?
TImageEnProc.CastColorRange
Declaration
procedure CastColorRange(BeginColor, EndColor, CastColor: TRGB);
Description
Use this method to force all colors included in the range BeginColor and EndColor to be equal to CastColor.
Example
// Force to black all gray levels from 50 to 100
var
BeginColor, EndColor, CastColor:TRGB;
begin
BeginColor:=CreateRGB(50,50,50);
EndColor:=CreateRGB(100,100,100);
CastColor:=CreateRGB(0,0,0);
ImageEnView1.Proc.CastColorRange(BeginColor,EndColor,CastColor);
end;
TImageEnProc.CastColor
Declaration
procedure CastColor(x, y: Integer; newColor:TRGB; tolerance: Integer);
Description
Performs a flood-fill starting at x, y coordinates. newColor is the color used to paint.
tolerance specifies the maximum difference from the starting pixel (0=no tolerance, pixels must be equals).
Example
// assuming X,Y = mouse coordinates, paints points to red
ImageEnView1.Proc.CastColor(ImageEnView1.XScr2Bmp(X), ImageEnView1.Yscr2Bmp(Y), CreateRGB(255,0,0), 0);
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html