I have to use CImg construct a image and draw a triangle using mid-point algorithm and then color the edges using linear interpolation. I have a hard time understanding the syntax of CImg Library.
All I have right now is the black blank image.
#include <iostream>
#include "CImg/CImg.h"
using namespace cimg_library;
using namespace std;
int main() {
//Create an empty image
CImg<unsigned char> triangle(255, 255, 1, 3, 0);
//Display and save filtered image
CImgDisplay disp(triangle);
while (!disp.is_closed())
disp.wait();
triangle.save("triangleInterpolation.bmp");
}