diff --git a/CImg.h b/CImg.h
index 00d9dd4e6bf1c72eb0d02384c4f49a9a15bb303e..b409bce94e31007498e37d79b2b3bbe0a497fa73 100644
--- a/CImg.h
+++ b/CImg.h
@@ -19271,7 +19271,7 @@ namespace cimg_library_suffixed {
               _cimg_mp_check_type(arg2,2,1,0);
               if (arg3==~0U) { // Auto-guess best output vector size
                 p1 = _cimg_mp_size(arg1);
-                p1 = p1?19*p1 - 1:18;
+                p1 = p1?22*p1 - 1:18;
               } else {
                 _cimg_mp_check_constant(arg3,3,3);
                 p1 = (unsigned int)mem[arg3];