Var
img : TImage;
X,Y : Integer;
SrcRect,DstRect:
TRect;
begin
Screen.Cursor := crHourglass;
try
X := Image1.Picture.Width;
Y := Image1.Picture.Height;
SrcRect := Rect(0,0,X,Y);
DstRect := Rect(0,Y,X,0);
img := TImage.Create(Self);
img.Width := X;
img.Height := Y;
img.Canvas.CopyRect(DstRect,Image1.Canvas,SrcRect);
Image1.Picture := img.Picture;
img.Free;
finally
Screen.Cursor := crDefault;
end;
end; |