Image rotate

Simply use the rotate left/right links to rotate the image left and right.

Zoom out Zoom out Zoom in Zoom in
Reset the image Reset Rotate left Left Rotate right Right
Zend

Stuff you could add:

  1. Animate the rotation with setTimeout() calling the Rotate function for as long as the mousebutton is depressed
  2. FireFox support using the "canvas" object (apparently)
  3. Persistency using AJAX to send the current rotation to a PHP script which stores (eg database/file) it. You could use the onmouseup event to signal the server when the rotation is done instead of sending every single update to the server (would generate way too much traffic). Also, as a poor-mans persistency you could use cookies to store the rotation state.
  4. As well as the normal left/right rotation controls you could add finer grained controls by giving a lower factor as the second argument to the Rotate() function.
  5. Would be neat to be able to drag the image around... could perhaps combine the rotation with this.
  6. Also it would be "very cool" to replace the image with higher res images at certain zoom levels to make it look nicer. Would (should) simply be a matter of having a higher res image which gets set as the SRC at certain zoom levels. Like Google maps does when you zoom in.