rotate image, 2 steps to flip the matrix