Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
x, y, k: Integer;
begin
with Image1.Picture.Bitmap do
begin
Width := 100 - 1;
Height := 100 - 1;
k := 0;
for y := 0 to Width do
for x := 0 to Width do
begin
Inc(k);
Canvas.Pixels[x, y] := k;
end;
ShowMessage(IntToStr(k));
end;
end;
Und besser in der Schule aufpassen.