]> granicus.if.org Git - imagemagick/commitdiff
Fixed clamping for the HDRI build.
authorDirk Lemstra <dirk@git.imagemagick.org>
Sun, 11 Mar 2018 19:46:45 +0000 (20:46 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sun, 11 Mar 2018 19:46:45 +0000 (20:46 +0100)
MagickCore/accelerate-kernels-private.h

index e31fecc11ead7c7a49ce58c5abf68d2daaa00cb3..1c960080759a434219b4526e86868a46ec112fac 100644 (file)
@@ -308,7 +308,7 @@ OPENCL_IF((MAGICKCORE_HDRI_SUPPORT == 1))
   STRINGIFY(
     inline CLQuantum ClampToQuantum(const float value)
       {
-        return (CLQuantum) value;
+        return (CLQuantum) clamp(value, 0.0f, QuantumRange);
       }
   )