Image Flipping

wxdqz

New Member
Using the pixel grabber, I have an array of the pixels in an image. Iam trying to flip this image through this array.Example:width = 4, height =3-------------| 0 | 1 | 2 | 3 ||------------| 4 | 5 | 6 | 7 ||-------------| 8 | 9 |10|11||------------|-------------|8,9,10,11||4,5,6,7 ||0,1,2,3 |pixel array, pa contains{[0],[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11]}newPixelArray should contain{pa[8],pa[9],pa[10],pa[11],pa[4],pa[5],pa[6],pa[7],pa[0],pa[1],pa[2],pa[3]}for(int i = 0; i<width*height-1; i++){newPixelArray = pa[XXXX];}Can someone help me fill in the XXXX?
 
Back
Top