diff --git a/website/src/previewImageExamples.cpp b/website/src/previewImageExamples.cpp index 22f7637ab3..125cd22213 100644 --- a/website/src/previewImageExamples.cpp +++ b/website/src/previewImageExamples.cpp @@ -28,7 +28,7 @@ unsigned char gamma (float x) { x = pow (5.5555f * max (0.f, x), 0.4545f) * 84.66f; - return (unsigned char) std::clamp (x, 0.f, 255.f); + return (unsigned char) Imath::clamp (x, 0.f, 255.f); } // [end gamma] @@ -60,7 +60,7 @@ makePreviewImage ( outPixel.r = gamma (inPixel.r); outPixel.g = gamma (inPixel.g); outPixel.b = gamma (inPixel.b); - outPixel.a = static_cast (std::clamp (inPixel.a * 255.f, 0.f, 255.f) + 0.5f); + outPixel.a = static_cast (Imath::clamp (inPixel.a * 255.f, 0.f, 255.f) + 0.5f); } } } diff --git a/website/src/writeRgbaWithPreview2.cpp b/website/src/writeRgbaWithPreview2.cpp index c617ef613a..93506e54a3 100644 --- a/website/src/writeRgbaWithPreview2.cpp +++ b/website/src/writeRgbaWithPreview2.cpp @@ -31,7 +31,7 @@ writeRgbaWithPreview2 (const char fileName[], int width, int height) outPixel.r = gamma (inPixel.r); outPixel.g = gamma (inPixel.g); outPixel.b = gamma (inPixel.b); - outPixel.a = int (std::clamp (inPixel.a * 255.f, 0.f, 255.f) + 0.5f); + outPixel.a = int (Imath::clamp (inPixel.a * 255.f, 0.f, 255.f) + 0.5f); } } }