Handle rotated images