[eluser]rogierb[/eluser]
What kind of error are you getting?
My guess its a problem with memory allocation when rotating a large jpg.
With GD or GD2 the memory consumption when processing a jpg is huge. The reason for this is it unpackes a JPG, performes the operation and then repacks the image.
I've seen memory consumption over 512 MB.
You can set your memory_limit to a higher number or use ImageMagick for instance.