На форме элементарно просто можно нарисовать кружек, квадрат, точку, ... заранее определенного цвета.
А вот как узнать цвет заранее определенной точки (например узнать цвет в целочисленном формате)?
function DesktopColor(const X, Y: Integer): TColor;
var
c: TCanvas;
begin
c := TCanvas.Create;
try
c.Handle := GetWindowDC(GetDesktopWindow);
Result := GetPixel(c.Handle, X, Y);
finally
c.Free;
end;
end;
r:=GetRValue(image1.Picture.Bitmap.Canvas.Pixels[i,j])
g:=GetGValue(image1.Picture.Bitmap.Canvas.Pixels[i,j])
b:=GetBValue(image1.Picture.Bitmap.Canvas.Pixels[i,j])procedure AnyToBitmap(Bmp:Graphics.TBitmap;const FileName:string);
var
OleGraphic:TOleGraphic;
Stream:TFileStream;
begin
Stream:=TFileStream.Create(FileName,fmOpenRead or fmShareDenyWrite);
try
OleGraphic:=TOleGraphic.Create;
try
OleGraphic.LoadFromStream(Stream);
Bmp.Width:=OleGraphic.Width;
Bmp.Height:=OleGraphic.Height;
Bmp.Palette:=OleGraphic.Palette;
Bmp.Transparent:=OleGraphic.Transparent;
Bmp.Canvas.Draw(0,0,OleGraphic);
finally
OleGraphic.Free;
end;
finally
Stream.Free;
end;
end;