Declaration
property Pixels[x, y: integer]: TRGB;
Description
Return the RGB value for the specified pixel. For black/white images it can be (0, 0, 0) or (255, 255, 255).
Note: This function doesn't perform a range check test.
procedure TMainForm.ImageEnMView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
// Paint pixels red as we move the cursor
bx := ImageEnView1.XScr2Bmp( X, False );
by := ImageEnView1.YScr2Bmp( Y, False );
if ( bx >= 0 ) and ( bx < ImageEnView1.IEBitmap.Width ) and ( by >= 0 ) and ( by < ImageEnView1.IEBitmap.Height ) then
begin
ImageEnView1.IEBitmap.Pixels[ bx, by ] := CreateRGB( 255, 0, 0 );
ImageEnView1.Update();
end;
end;
See Also
◼CreateRGB
◼TRGB2TColor
◼TColor2TRGB