C
CHINESEWHOAMI
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TTPLL.SpeedButton3Click(Sender: TObject);
var x,y : Integer;
TmpBitMap : TBitmap;
begin
TmpBitMap:=TBitmap.Create;
TmpBitMap.Assign(Image1.Picture.Graphic);
with Image1do
begin
Picture.Bitmap.Height:= TmpBitMap.Width;
Picture.Bitmap.Width:= TmpBitMap.Height;
for x:=0 to Heightdo
for y:=0 to Widthdo
Canvas.Pixels[TmpBitMap.Height-x,y]:=TmpBitMap.Canvas.Pixels[y,x];
end;
end;
是一段图片旋转代码,但其结果是图像会乱掉,请各位兄弟帮忙看一下
var x,y : Integer;
TmpBitMap : TBitmap;
begin
TmpBitMap:=TBitmap.Create;
TmpBitMap.Assign(Image1.Picture.Graphic);
with Image1do
begin
Picture.Bitmap.Height:= TmpBitMap.Width;
Picture.Bitmap.Width:= TmpBitMap.Height;
for x:=0 to Heightdo
for y:=0 to Widthdo
Canvas.Pixels[TmpBitMap.Height-x,y]:=TmpBitMap.Canvas.Pixels[y,x];
end;
end;
是一段图片旋转代码,但其结果是图像会乱掉,请各位兄弟帮忙看一下