From c6ea80dd3a77c39d5bcf2f5512144d5a84506640 Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 26 Sep 2011 17:38:15 +0000 Subject: [PATCH] --- MagickCore/magick-type.h | 3 ++- MagickCore/statistic.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MagickCore/magick-type.h b/MagickCore/magick-type.h index 4fa83d5df..de80e2993 100644 --- a/MagickCore/magick-type.h +++ b/MagickCore/magick-type.h @@ -99,7 +99,8 @@ typedef double Quantum; # error "MAGICKCORE_QUANTUM_DEPTH must be one of 8, 16, 32, or 64" #endif #endif -#define MagickPI 3.14159265358979323846264338327950288419716939937510L +#define MagickMaxFloat 3.402823466E+38F +#define MagickPI 3.14159265358979323846264338327950288419716939937510L #define QuantumScale ((double) 1.0/(double) QuantumRange) /* diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c index 5459f7334..69290e674 100644 --- a/MagickCore/statistic.c +++ b/MagickCore/statistic.c @@ -1351,8 +1351,8 @@ MagickExport MagickBooleanType GetImageRange(const Image *image,double *minima, if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); status=MagickTrue; - *maxima=(-1.0E-37); - *minima=1.0E+37; + *maxima=(-MagickMaxFloat); + *minima=MagickMaxFloat; image_view=AcquireCacheView(image); #if defined(MAGICKCORE_OPENMP_SUPPORT) #pragma omp parallel for schedule(dynamic) shared(status) omp_throttle(1) @@ -1498,8 +1498,8 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image, for (i=0; i <= (ssize_t) MaxPixelChannels; i++) { channel_statistics[i].depth=1; - channel_statistics[i].maxima=(-1.0E-37); - channel_statistics[i].minima=1.0E+37; + channel_statistics[i].maxima=(-MagickMaxFloat); + channel_statistics[i].minima=MagickMaxFloat; } for (y=0; y < (ssize_t) image->rows; y++) { -- 2.40.0