//Rotates 90 degrees for (ri = 0; ri < image->h; ri++) { for (ci = 0; ci < image->w; ci++) { result->pData[ri*image->w + ci] = image->pData[(image->w -1 -ci)*image->w + ri]; } }
Doing rotations other than 90 degrees is a bit harder (interpolation and making a larger image size is necessary), and I'll touch that when I have to.
//To run executable ./hw5 waldoSearch01.pgm 200 55