Here is the relevant code from the full listing:
#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 does the line (src,gray1,gray2).display("RGB to Grayscale");
work? How is the display
member function applied to each of the objects in the comma-separated list?