How do I rotate a jpeg image?

Hello,

I have a TImage that contains a jpeg, which I need to rotate 90 degrees.  I
found a small routine to do this, but when I attempt to make any changes to
the image, I receive an exception: "Can only modify an image if it contains
a bitmap."

My questions:  (1) Do I need to convert the image to a bitmap first, rotate
it, and convert it back to jpeg?  If so, are there any code examples of
this?  (2) Is there any other way to rotate a jpeg without converting it to
a bitmap? (I'm using Delphi 4.0.)

Any help is greatly appreciated.

John Roth