diff --git a/dlib/pixel.h b/dlib/pixel.h index c3bcbbae2..0082df576 100644 --- a/dlib/pixel.h +++ b/dlib/pixel.h @@ -699,8 +699,8 @@ namespace dlib HSL c2; using namespace std; - themin = min(c1.r,min(c1.g,c1.b)); - themax = max(c1.r,max(c1.g,c1.b)); + themin = std::min(c1.r,std::min(c1.g,c1.b)); + themax = std::max(c1.r,std::max(c1.g,c1.b)); delta = themax - themin; c2.l = (themin + themax) / 2; c2.s = 0; @@ -743,9 +743,9 @@ namespace dlib sat.g = 0; sat.b = (360 - c1.h) / 60.0; } - sat.r = min(sat.r,1.0); - sat.g = min(sat.g,1.0); - sat.b = min(sat.b,1.0); + sat.r = std::min(sat.r,1.0); + sat.g = std::min(sat.g,1.0); + sat.b = std::min(sat.b,1.0); ctmp.r = 2 * c1.s * sat.r + (1 - c1.s); ctmp.g = 2 * c1.s * sat.g + (1 - c1.s);