/** * function main starts here **/ int main() { /** * define test1 and output as BMP image **/ BMP test1; BMP output; /** * loads "in.bmp" into test1. **/ test1.readFromFile("in.bmp"); //test1.readFromFile("in.bmp"); /** * loads "in.bmp" into output. **/ output.readFromFile("in.bmp"); /** * call function reverse to rotate the test1 by 180 degree.and * load the reversed image to image output **/ output = reverse(test1, test1.tellWidth(), test1.tellHeight(), output); /**writes the image output to the disk **/ output.writeToFile("out.bmp"); return 0; }