diff -urN CImg-1.5.9.orig/CImg.h CImg-1.5.9/CImg.h --- CImg-1.5.9.orig/CImg.h 2014-07-03 12:15:04.000000000 +0200 +++ CImg-1.5.9/CImg.h 2014-07-04 09:21:52.000000000 +0200 @@ -40947,8 +40947,8 @@ #else const char *volatile nfilename = filename; // two 'volatile' here to remove a g++ warning due to 'setjmp'. std::FILE *volatile nfile = file?file:cimg::fopen(nfilename,"wb"); + volatile double stmin, stmax = (double)max_min(stmin); - double stmin, stmax = (double)max_min(stmin); if (_depth>1) cimg::warn(_cimg_instance "save_png(): Instance is volumetric, only the first slice will be saved in file '%s'.", @@ -40996,7 +40996,9 @@ nfilename?nfilename:"(FILE*)"); } png_init_io(png_ptr, nfile); + const int bit_depth = bytes_per_pixel?(bytes_per_pixel*8):(stmax>=256?16:8); + int color_type; switch (spectrum()) { case 1 : color_type = PNG_COLOR_TYPE_GRAY; break; @@ -41114,6 +41116,7 @@ // Deallocate Image Write Memory cimg_forY(*this,n) delete[] imgData[n]; delete[] imgData; + if (!file) cimg::fclose(nfile); return *this; #endif Files CImg-1.5.9.orig/html/CImg_reference.pdf and CImg-1.5.9/html/CImg_reference.pdf differ diff -urN CImg-1.5.9.orig/html/header2.html CImg-1.5.9/html/header2.html --- CImg-1.5.9.orig/html/header2.html 2014-07-03 12:15:02.000000000 +0200 +++ CImg-1.5.9/html/header2.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,68 +0,0 @@ - - - - The CImg Library - C++ Template Image Processing Toolkit - - - - - - - - - -
-
-
-
-
-
-
-
-
- - -
- - [ Main ] - [ Download ] - [ Screenshots ] - [ FAQ ] - [ Tutorial ] - [ Documentation ] - [ Forum ] - [ Links ] - - - -
-
-
-
-