Guarda se ti puo' essere utile questo:
http://www.walterzorn.com/rotate_img/rotate_img.htm