This script will rotate an existing image about the X, Y and Z axes. It will also include a magnification factor so you can scale your image while rotating.
The inputs are the angles to rotate the image around the X, Y, and Z axes. Some values (usually high X and Y values) will result in a very distorted picture, regardless of what other inputs you have. If you get one of those, just undo and try again. That's just the way math works, folks!
The "Camera Position" controls several things, including how distorted the image will be. The default value gives good results most of the time. Very large values will tend to somewhat smooth out larger rotation angles.
The magnification factor will scale up the area of the image. A 640x480 image with a magnification factor of 1.5x, would have a rotated area of 640x480x1.5 pixels. The canvas itself will be larger than that, as there will be transparent areas around the rotated base image. As you would expect, large values for the magnification factor will result in very large images that will take up lots of memory.
In addition to the script, I've attached a picture of a rendered grid, and the picture of that grid rotated with the default values of the script. When installed, the script will appear in the Filters/SambrookJM menu, but that can be changed by editing the last line of the script to put it wherever you want in your menu hierarchy.
For some more information on what this script does, check out http://en.wikipedia.org/wiki/3D_projection
[Edit] I've added a "(Zero will give you an error. Please do not use that value.)" message on the script window for the camera location, and changed the default camera value to 9.9 to make it more difficult to get to 0 via the arrows.