saving rotation state of image