I crashed when saving a PNG without of range values, because of this warning message
if (stmin<0 || (bytes_per_pixel==1 && stmax>=256) || stmax>=65536)
cimg::warn(_cimg_instance
"save_png(): Instance has pixel values in [%g,%g], probable type overflow in file '%s'.",
cimg_instance,
filename,stmin,stmax);
It has the printf arguments out of order (filename should be last), causing it to treat a float as a char const *.
I crashed when saving a PNG without of range values, because of this warning message if (stmin<0 || (bytes_per_pixel==1 && stmax>=256) || stmax>=65536) cimg::warn(_cimg_instance "save_png(): Instance has pixel values in [%g,%g], probable type overflow in file '%s'.", cimg_instance, filename,stmin,stmax);
It has the printf arguments out of order (filename should be last), causing it to treat a float as a char const *.
Trivial fix, obviously :-)