cimg_library::CImg<unsigned char> img("test.png");
invert(img);
img.save("test.png"); //Error with saving
invert is a user-defined function.
Error:
[CImg] *** CImgIOException *** cimg::fopen(): Failed to open file 'test.png' with mode 'wb'.
terminate called after throwing an instance of 'cimg_library::CImgIOException'
what(): cimg::fopen(): Failed to open file 'test.png' with mode 'wb'.
Hello. My code is extremly simple:
invert
is a user-defined function.Error: