diff --git a/CImg.h b/CImg.h index f54fe460..d3735635 100644 --- a/CImg.h +++ b/CImg.h @@ -54,7 +54,7 @@ // Set version number of the library. #ifndef cimg_version -#define cimg_version 350 +#define cimg_version 351 /*----------------------------------------------------------- # @@ -21296,6 +21296,17 @@ namespace cimg_library { _cimg_mp_return(pos); } + if (!std::strncmp(ss,"isfinite(",9)) { // Is finite? + _cimg_mp_op("Function 'isfinite()'"); + s0 = ss + 9; + if (s0==se1) _cimg_mp_return(0); + arg1 = compile(s0,se1,depth1,0,block_flags); + if (is_vector(arg1)) _cimg_mp_vector1_v(mp_isfinite,arg1); + if (is_const_scalar(arg1)) + _cimg_mp_return((unsigned int)cimg::type::is_finite(mem[arg1])); + _cimg_mp_scalar1(mp_isfinite,arg1); + } + if (!std::strncmp(ss,"isin(",5)) { // Is in sequence/vector? if (ss5>=se1) _cimg_mp_return(0); _cimg_mp_op("Function 'isin()'"); @@ -26428,6 +26439,10 @@ namespace cimg_library { return (double)cimg::is_directory(ss); } + static double mp_isfinite(_cimg_math_parser& mp) { + return (double)cimg::type::is_finite(_mp_arg(2)); + } + static double mp_isin(_cimg_math_parser& mp) { const unsigned int i_end = (unsigned int)mp.opcode[2], @@ -45540,7 +45555,7 @@ namespace cimg_library { p1+=offy1; p2+=offy2; } return patch_penalization==0?ssd:cimg::sqr(std::sqrt(ssd) + - patch_penalization*psizewc*psizeh*psized*penalty(xc,yc,zc)/100); + patch_penalization*psizewc*psizeh*psized*penalty(xc,yc,zc)/100); } static float _matchpatch(const CImg& img1, const CImg& img2, const CImg& penalty, diff --git a/html/header.html b/html/header.html index 667813a5..928023b2 100644 --- a/html/header.html +++ b/html/header.html @@ -23,7 +23,7 @@
Logo

- Latest stable version: 3.4.3        Current pre-release: 3.5.0 (2024/12/29) + Latest stable version: 3.5.0 (2024/12/31)


diff --git a/html/header_doxygen.html b/html/header_doxygen.html index 1c333697..c6dbe346 100644 --- a/html/header_doxygen.html +++ b/html/header_doxygen.html @@ -26,7 +26,7 @@
Logo

- Latest stable version: 3.4.3        Current pre-release: 3.5.0 (2024/12/29) + Latest stable version: 3.5.0 (2024/12/31)