冰
冰冷的雨
Unregistered / Unconfirmed
GUEST, unregistred user!
我要从大图imgPreview中循环取小图image1进行处理,纵横坐标的循环增量分别为1,程序
如下:
imgPreview.Picture.Bitmap.PixelFormat := pf24Bit;
image1.Picture.Bitmap.Width := MOULD_WIDTH;
image1.Picture.Bitmap.Height := MOULD_HIGH;
Image1.Picture.Bitmap.PixelFormat := pf24Bit;
for y := 0 to imgPreview.Picture.Bitmap.Height - MOULD_HIGH-1 do
begin
for x := 0 to imgPreview.Picture.Bitmap.Width - MOULD_WIDTH-1 do
begin
t := 0;
rt := rect(x,y,x+MOULD_WIDTH,y+MOULD_HIGH);
Image1.Canvas.CopyRect(rt,ImgPreview.Canvas,rt);
。。。 //其它处理
end;
end;
运行之后,image1一直是空白的,原因是什么?
如下:
imgPreview.Picture.Bitmap.PixelFormat := pf24Bit;
image1.Picture.Bitmap.Width := MOULD_WIDTH;
image1.Picture.Bitmap.Height := MOULD_HIGH;
Image1.Picture.Bitmap.PixelFormat := pf24Bit;
for y := 0 to imgPreview.Picture.Bitmap.Height - MOULD_HIGH-1 do
begin
for x := 0 to imgPreview.Picture.Bitmap.Width - MOULD_WIDTH-1 do
begin
t := 0;
rt := rect(x,y,x+MOULD_WIDTH,y+MOULD_HIGH);
Image1.Canvas.CopyRect(rt,ImgPreview.Canvas,rt);
。。。 //其它处理
end;
end;
运行之后,image1一直是空白的,原因是什么?