Flip and rotate images