nur mal auf die schnelle dahingedaddelt. erwarte keine wunder.
Delphi-Quellcode:
procedure TForm9.FormCreate(Sender: TObject);
type
TRGB =
record
b,g,r: Byte;
end;
ARGB =
array [0..1]
of TRGB;
PARGB = ^ARGB;
var
p: PARGB;
x,y: Integer;
bmp:
Vcl.Graphics.TBitmap;
begin
bmp :=
Vcl.Graphics.TBitmap.Create;
try
bmp.PixelFormat := pf24bit;
bmp.Width := 50;
bmp.Height := 50;
for y := 0
to (bmp.Height - 1)
do
begin
p := bmp.ScanLine[y];
for x := 0
to (bmp.Width - 1)
do
begin
p[x].r := Random(High(Byte));
p[x].g := Random(High(Byte));
p[x].b := Random(High(Byte));
end;
end;
// mach was...
finally
bmp.Free;
end;
end;