]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 22 Apr 2013 15:59:50 +0000 (15:59 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 22 Apr 2013 15:59:50 +0000 (15:59 +0000)
MagickCore/enhance.c

index f45a296fe507342251bc08e72150f02b639fe783..2dfca2f57657740a3f7eff1dde94ffb153c44cdb 100644 (file)
@@ -2328,7 +2328,7 @@ static inline double LevelPixel(const double black_point,
   scale=(white_point != black_point) ? 1.0/(white_point-black_point) : 1.0;
   level_pixel=(double) QuantumRange*pow(scale*((double) pixel-
     black_point),1.0/gamma);
-  return(level_pixel);
+  return((MagickRealType) (IsNaN(level_pixel) ? 0.0 : level_pixel));
 }
 
 MagickExport MagickBooleanType LevelImage(Image *image,const double black_point,