procedure TForm1.Button1Click(Sender: TObject);
var
i,j: integer;
begin
//确定旋转后位图的大小
image2.Picture.Bitmap.Height:=image1.picture.width;
image2.Picture.Bitmap.Width:=image1.picture.height;
for i:=0 to image1.Height do
for j:=0 to image1.Width do
image2.canvas.Pixels[(-i+image1.Height),j]:=image1.canvas.Pixels[j,i];
end;