Thanks,
Expand|Select|Wrap|Line Numbers
- int p;
- unsigned char temp;
- for(int x = 0; x < height; x++)
- for(int y = 0; y < width ; y++)
- {
- p = x + y * width;
- temp = image[p].blue;
- image[p].blue = image[(height * x) + (height - y)].blue;
- image[(height * x) + (height - y)].blue = temp;
- temp = image[p].red;
- image[p].red = image[(height * x) + (height - y)].red;
- image[(height * x) + (height - y)].red = temp;
- temp = image[p].green;
- image[p].green = image[(height * x) + (height - y)].green;
- image[(height * x) + (height - y)].green = temp;
- }
- int temp1;
- temp1 = width;
- width = height;
- height = temp;