Main procedure ----------------
| 55 | // Main procedure |
| 56 | //---------------- |
| 57 | int main() { |
| 58 | |
| 59 | // Load images. |
| 60 | CImg<short> img1(cimg_imagepath "milla.bmp"); |
| 61 | const CImg<float> img2 = CImg<float>(cimg_imagepath "parrot.ppm").resize(img1,3); |
| 62 | const float default_color[] = { 30,30,80 }; |
| 63 | |
| 64 | // Modify 'img1' using the RGB pixel accessor. |
| 65 | cimg_forXY(img1,x,y) |
| 66 | if (!((x*y)%31)) img1.RGB_at(x,y) = default_color; |
| 67 | else if ((x+y)%2) img1.RGB_at(x,y) = img2.RGB_at(x,y); |
| 68 | img1.display(); |
| 69 | |
| 70 | // Quit. |
| 71 | return 0; |
| 72 | } |
| 73 | |
| 74 | #else |
| 75 |
nothing calls this directly
no test coverage detected