Here is the relevant code from the full list :
#include "CImg.h" using namespace cimg_library; int main() { CImg<unsigned char> src("Tulips.jpg"); int width = src.width(); int height = src.height(); int depth = src.depth(); //New grayscale images. CImg<unsigned char> gray1(width,height,depth,1); CImg<unsigned char> gray2(width,height,depth,1); // ... (src,gray1,gray2).display("RGB to Grayscale"); }
How the line works (src,gray1,gray2).display("RGB to Grayscale"); ? How does the display member function apply to each of the objects in a comma-separated list?
source share