var
newbmp:TBitmap;
i,j,bmpheight,bmpwidth:integer;
xgroup,xcount:integer;
begin
newbmp:= TBitmap.Create;
newbmp.Width:=image1.Width;
newbmp.Height:=image1.Height;
bmpheight:=image1.Height;
bmpwidth:=image1.Width;
xgroup:=16;
xcount:=bmpheight div xgroup;
for i:=0 to xcount do
for j:=0 to xgroup do
begin
newbmp.Canvas.CopyRect(Rect(0,xcount *j +i -1,bmpwidth,xcount *j
+i),image1.Canvas,Rect(0,xcount *j +i -1,bmpwidth,xcount *j +i));
form1.Canvas.Draw(120,100,newbmp);
end;
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/