Added rotation of images.