Adding partial support for rotation.

Should rotate the image and keep bounds functionality. Panning and zooming should rotate accordingly as well. Overlays rotate position, but do not rotate themselves.