From 82ca023f6b149632945dda00e4f48462c8ed5a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Tschumperl=C3=A9?= Date: Wed, 6 Jun 2018 00:01:27 +0200 Subject: [PATCH] . --- src/main/cpp/CImg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/cpp/CImg.h b/src/main/cpp/CImg.h index 0f78810..1039a55 100644 --- a/src/main/cpp/CImg.h +++ b/src/main/cpp/CImg.h @@ -27484,7 +27484,7 @@ namespace cimg_library_suffixed { case 2 : { // Salt & Pepper noise if (nsigma<0) nsigma = -nsigma; if (M==m) { - if (cimg::type::is_float()) { m = (Tfloat)0; M = (Tfloat)1; } + if (cimg::type::is_float()) { --m; ++M; } else { m = (Tfloat)cimg::type::min(); M = (Tfloat)cimg::type::max(); } } cimg_rof(*this,ptrd,T) if (cimg::rand(100)