帮我看一下这样写对不对,应该怎么改正?
procedure TForm1.Button1Click(Sender: TObject);
var
bmpArray:array of byte;
imageHeight,imageWidth:integer;
i:integer;
begin
imageHeight:=100;
imageWidth:=100;
image1.Picture.Bitmap.PixelFormat:=pf24bit;
image1.Picture.Bitmap.Width:=imageWidth;
image1.picture.Bitmap.Height:=imageHeight;
setlength(bmpArray,imageHeight*imageWidth*3);
for i:=0 to imageHeight*imageWidth*3-1 do
begin
bmpArray:=255;
end;
move(bmpArray,
image1.Picture.Bitmap.scanline[image1.Picture.Bitmap.height-1]^,
imageHeight*imageWidth*3);
image1.Invalidate;
end;