title: Rotating a 2D pixel array by 90 degrees
body: <p>I have an array of pixel data for an image. The image I am getting is already rotated to 270 degrees. So I am trying to rotate it again by 90 degrees to have the correct image. I've tried a transpose algorithm, by changing <code>data[x][y]</code> to <code>data[y][x]</code>, but I don't think that's the correct way. Can anyone guide me what can I do to have it rotated?</p>