14 #define cimg_use_jpeg // pb avec vcpkg en Release uniquement, why ?
25 #undef _PTHREAD_H // to avoid linking with pthread
26 #define cimg_display 0 // no display
29 int main(
int argc,
char **argv)
33 std::cout <<
"Usage: " << argv[0] <<
" <path_to_image_file_1> [<path_to_image_file_2>...]\n";
37 for(
int i = 1; i < argc; i++)
39 std::string filename(argv[i]);
40 if(filename.substr(filename.size() - 4) ==
".jpg")
47 std::cout <<
"----------------------------\n";
48 std::cout <<
"loading " << argv[i] <<
"...\n";
49 cimg_library::CImg<unsigned char> image(argv[i]);
52 std::cout <<
"with " << image.width() <<
'\n';
53 std::cout <<
"height " << image.height() <<
'\n';
54 std::cout <<
"depth " << image.depth() <<
'\n';
55 std::cout <<
"spectrum " << image.spectrum() <<
'\n';