Rotate images if required