En un TImage hay que distinguir el Picture si es bmp u otro tipo dado que el tratamiento es diferente.
En todo caso tú quieres rotar un jpg dentro de un TImage pues prueba con este código.
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
Var
Bmp1,bmp2 : TBitmap;
x,y : integer;
begin
Bmp1 := TBitmap.Create;
Bmp1.Assign(Image1.Picture.Graphic);
Bmp2 := TBitmap.Create;
Bmp2.Width:=Bmp1.height;
Bmp2.Height := Bmp2.width;
for x:=0 to Bmp1.Height -1 do
begin
for y:=0 to Bmp1.Width -1 do
begin
Bmp2.Canvas.Pixels[x,(Bmp1.Height -1) - y]:= Bmp1.Canvas.Pixels[y,x];
end;
end;
Image1.Picture.Graphic.Assign(Bmp2);
Image1.Refresh;
end;
El resultado final, será cosa tuya.
