]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 22 Apr 2013 16:01:54 +0000 (16:01 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 22 Apr 2013 16:01:54 +0000 (16:01 +0000)
MagickCore/enhance.c
MagickCore/image-private.h
MagickCore/morphology-private.h

index 2dfca2f57657740a3f7eff1dde94ffb153c44cdb..95a64a859cd8d396522c590155aee3ba6ed08b62 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((MagickRealType) (IsNaN(level_pixel) ? 0.0 : level_pixel));
+  return(IsNaN(level_pixel) != MagickFalse ? 0.0 : level_pixel);
 }
 
 MagickExport MagickBooleanType LevelImage(Image *image,const double black_point,
index 6502f6560badac4962b0d0b664c7bfa0637d7e4b..4faeb35ff17327093af4ad857ad305da3d1c2c54 100644 (file)
@@ -22,6 +22,7 @@
 extern "C" {
 #endif
 
+#define IsNaN(a) ((a) != (a) ? MagickTrue : MagickFalse)
 #define Magick2PI    6.28318530717958647692528676655900576839433879875020
 #define MagickPHI    1.61803398874989484820458683436563811772030917980576
 #define MagickPI2    1.57079632679489661923132169163975144209858469968755
index 048cbabc5d4e216ba9703ebc61a186e4bd0b3b9b..978ac2e75c55d37282ef84b0bad1d541b7acf305 100644 (file)
@@ -28,21 +28,6 @@ extern "C" {
 
 #include "MagickCore/morphology.h"
 
-/*
-  The following test is for special floating point numbers of value NaN (not
-  a number), that may be used within a Kernel Definition.  NaN's are defined
-  as part of the IEEE standard for floating point number representation.
-  They are used as a Kernel value to mean that this kernel position is not
-  part of the kernel neighbourhood for convolution or morphology processing,
-  and thus should be ignored.  This allows the use of 'shaped' kernels.
-
-  The special property that two NaN's are never equal, even if they are from
-  the same variable allow you to test if a value is special NaN value.
-
-  This macro  IsNaN() is thus is only true if the value given is NaN.
-*/
-#define IsNaN(a) ((a) != (a) ? MagickTrue : MagickFalse)
-
 extern MagickPrivate Image
   *MorphologyApply(const Image *,const MorphologyMethod,const ssize_t,
     const KernelInfo *,const CompositeOperator,const double,ExceptionInfo *);