以下是完整清单中的相关代码:
#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");
}
这条线是如何(src,gray1,gray2).display("RGB to Grayscale");
工作的?成员函数如何display
应用于逗号分隔列表中的每个对象?