From e16ab68b0c3bd9c0a688444c303f42dc95f02290 Mon Sep 17 00:00:00 2001 From: David Tschumperle Date: Wed, 15 Jan 2025 18:59:13 +0100 Subject: [PATCH 1/2] . --- CImg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CImg.h b/CImg.h index 24cd2425..9ff253f0 100644 --- a/CImg.h +++ b/CImg.h @@ -20038,7 +20038,7 @@ namespace cimg_library { "CImg<%s>::%s: %s: Specified kernel size (%ux%ux%ux%u = %u) does " "not match size of kernel variable (%u), in expression '%s'.", pixel_type(),_cimg_mp_calling_function,s_op, - wK,hK,dK,sK,wK*hK*dK*sK,size(opcode[2]), + wK,hK,dK,sK,wK*hK*dK*sK,size(opcode[7]), s0); } From 959582731e043fb8b1e496b18e27b1a39f417d10 Mon Sep 17 00:00:00 2001 From: David Tschumperle Date: Fri, 17 Jan 2025 07:48:44 +0100 Subject: [PATCH 2/2] . --- CImg.h | 78 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/CImg.h b/CImg.h index 9ff253f0..cbaa70df 100644 --- a/CImg.h +++ b/CImg.h @@ -17010,7 +17010,7 @@ namespace cimg_library { #define _cimg_mp_calling_function s_calling_function()._data #define _cimg_mp_check_const_scalar(arg,n_arg,mode) check_const_scalar(arg,n_arg,mode,ss,se,saved_char) #define _cimg_mp_check_const_index(arg) check_const_index(arg,ss,se,saved_char) -#define _cimg_mp_check_notnan_index(arg) check_notnan_index(arg,ss,se,saved_char) +#define _cimg_mp_check_notnan_index(arg,s_arg) check_notnan_index(arg,s_arg,ss,se,saved_char) #define _cimg_mp_check_list() check_list(ss,se,saved_char) #define _cimg_mp_check_matrix_square(arg,n_arg) check_matrix_square(arg,n_arg,ss,se,saved_char) #define _cimg_mp_check_type(arg,n_arg,mode,N) check_type(arg,n_arg,mode,N,ss,se,saved_char) @@ -17477,7 +17477,7 @@ namespace cimg_library { if (*ss2=='#') { // Index specified s0 = ss3; while (s0::vector((ulongT)mp_da_freeze,_cimg_mp_slot_nan,p1).move_to(code); @@ -20167,7 +20167,7 @@ namespace cimg_library { if (ss[10]=='#') { // Index specified s0 = ss + 11; while (s0::vector((ulongT)mp_flood,_cimg_mp_slot_nan,0,p1).move_to(l_opcode); @@ -21026,7 +21026,7 @@ namespace cimg_library { _cimg_mp_op("Function 'h()'"); if (*ss2=='#') { // Index specified p1 = compile(ss3,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss3); _cimg_mp_check_list(); } else { if (ss2!=se1) break; p1 = ~0U; } _cimg_mp_scalar1(mp_image_h,p1); @@ -21063,7 +21063,7 @@ namespace cimg_library { _cimg_mp_op("Function 'ic()'"); if (*ss3=='#') { // Index specified p1 = compile(ss4,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss4); _cimg_mp_check_list(); } else { if (ss3!=se1) break; p1 = ~0U; } pos = scalar(); @@ -21076,7 +21076,7 @@ namespace cimg_library { _cimg_mp_op("Function 'in()'"); if (*ss3=='#') { // Index specified p1 = compile(ss4,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss4); _cimg_mp_check_list(); } else { if (ss3!=se1) break; p1 = ~0U; } pos = scalar(); @@ -21743,7 +21743,7 @@ namespace cimg_library { if (*ss5=='#') { // Index specified s0 = ss6; while (s0::vector((ulongT)mp_image_print,_cimg_mp_slot_nan,p1).move_to(code); _cimg_mp_return_nan(); @@ -22335,7 +22335,7 @@ namespace cimg_library { _cimg_mp_op("Function 's()'"); if (*ss2=='#') { // Index specified p1 = compile(ss3,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss3); _cimg_mp_check_list(); } else { if (ss2!=se1) break; p1 = ~0U; } _cimg_mp_scalar1(mp_image_s,p1); @@ -22553,7 +22553,7 @@ namespace cimg_library { _cimg_mp_op("Function 'stats()'"); if (*ss6=='#') { // Index specified p1 = compile(ss7,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss7); _cimg_mp_check_list(); } else { if (ss6!=se1) break; p1 = ~0U; } pos = vector(14); @@ -23077,7 +23077,7 @@ namespace cimg_library { _cimg_mp_op("Function 'w()'"); if (*ss2=='#') { // Index specified p1 = compile(ss3,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss3); _cimg_mp_check_list(); } else { if (ss2!=se1) break; p1 = ~0U; } _cimg_mp_scalar1(mp_image_w,p1); @@ -23087,7 +23087,7 @@ namespace cimg_library { _cimg_mp_op("Function 'wh()'"); if (*ss3=='#') { // Index specified p1 = compile(ss4,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss4); _cimg_mp_check_list(); } else { if (ss3!=se1) break; p1 = ~0U; } _cimg_mp_scalar1(mp_image_wh,p1); @@ -23097,7 +23097,7 @@ namespace cimg_library { _cimg_mp_op("Function 'whd()'"); if (*ss4=='#') { // Index specified p1 = compile(ss5,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss5); _cimg_mp_check_list(); } else { if (ss4!=se1) break; p1 = ~0U; } _cimg_mp_scalar1(mp_image_whd,p1); @@ -23107,7 +23107,7 @@ namespace cimg_library { _cimg_mp_op("Function 'whds()'"); if (*ss5=='#') { // Index specified p1 = compile(ss6,se1,depth1,0,block_flags); - _cimg_mp_check_notnan_index(p1); + _cimg_mp_check_notnan_index(p1,ss6); _cimg_mp_check_list(); } else { if (ss5!=se1) break; p1 = ~0U; } _cimg_mp_scalar1(mp_image_whds,p1); @@ -23547,7 +23547,7 @@ namespace cimg_library { // Variables related to the input list of images. if (*ss1=='#' && ss2::is_nan(mem[arg])))) { char *s0; _cimg_mp_strerr; throw CImgArgumentException("[" cimg_appname "_math_parser] " - "CImg<%s>::%s: %s%s Specified index is NaN.", - pixel_type(),_cimg_mp_calling_function,s_op,*s_op?":":""); + "CImg<%s>::%s: %s%s Specified index '%s' is NaN.", + pixel_type(),_cimg_mp_calling_function,s_op,*s_op?":":"",s_arg); } }