Re: SetPixel - schnellere Variante
2. Feb 2005, 16:00
Moin'!
Scanline verwende ich folgendermaßen:
[
procedure TForm1.FormClick(Sender: TObject);
type
TPixel = record
B,G,R:Byte;
end;
var
P:^TPixel;
x,y:Integer;
begin
Image1.Picture.Bitmap.LoadFromFile('Dateiname');
for y:=0 to Image1.Height-1 do
begin
P:=Image1.Picture.Bitmap.ScanLine[y];
for x:=0 to Image1.Width-1 do
begin
P.R:=Wert;
P.G:=Wert;
P.B:=Wert;
Inc(P);
end;
end;
end;
]
Hilft das ?
|