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,
extern "C" {
#endif
+#define IsNaN(a) ((a) != (a) ? MagickTrue : MagickFalse)
#define Magick2PI 6.28318530717958647692528676655900576839433879875020
#define MagickPHI 1.61803398874989484820458683436563811772030917980576
#define MagickPI2 1.57079632679489661923132169163975144209858469968755
#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 *);