5454
5555// Set version number of the library.
5656#ifndef cimg_version
57- #define cimg_version 372
57+ #define cimg_version 373
5858
5959/*-----------------------------------------------------------
6060 #
@@ -30013,8 +30013,8 @@ namespace cimg_library {
3001330013 }
3001430014
3001530015 static double mp_vector_display(_cimg_math_parser& mp) {
30016- const unsigned int
30017- _siz = (unsigned int )mp.opcode[3],
30016+ const unsigned long
30017+ _siz = (unsigned long )mp.opcode[3],
3001830018 siz = _siz?_siz:1;
3001930019 const double *const ptr = &_mp_arg(1) + (_siz?1:0);
3002030020 const int
@@ -30024,8 +30024,12 @@ namespace cimg_library {
3002430024 s = (int)_mp_arg(7);
3002530025 CImg<doubleT> img;
3002630026 if (w>0 && h>0 && d>0 && s>0) {
30027- if ((unsigned int)w*h*d*s<=siz) img.assign(ptr,w,h,d,s,true);
30028- else img.assign(ptr,siz).resize(w,h,d,s,-1);
30027+ if ((unsigned long)w*h*d*s!=siz)
30028+ throw CImgArgumentException("[" cimg_appname "_math_parser] CImg<%s>: Function 'display()': "
30029+ "Invalid request to display a vector of size #%lu as a (%d,%d,%d,%d) image "
30030+ "(%lu values).",
30031+ mp.imgin.pixel_type(),siz,w,h,d,s,(unsigned long)w*h*d*s);
30032+ img.assign(ptr,w,h,d,s,true);
3002930033 } else img.assign(ptr,1,siz,1,1,true);
3003030034
3003130035 CImg<charT> expr(mp.opcode[2]);
@@ -68463,9 +68467,9 @@ namespace cimg_library {
6846368467 writers[index] = 0;
6846468468 cimg::mutex(9,0);
6846568469 throw CImgIOException(_cimglist_instance
68466- "save_video(): File '%s', unable to initialize video writer with codec '%c%c%c%c '.",
68470+ "save_video(): File '%s', unable to initialize video writer with codec '%s '.",
6846768471 cimglist_instance,filename,
68468- codec0,codec1,codec2,codec3 );
68472+ _codec );
6846968473 }
6847068474 CImg<charT>::string(filename).move_to(filenames[index]);
6847168475 sizes(index,0) = W;
0 commit comments