]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 26 Sep 2011 17:38:15 +0000 (17:38 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 26 Sep 2011 17:38:15 +0000 (17:38 +0000)
MagickCore/magick-type.h
MagickCore/statistic.c

index 4fa83d5df397e46ddb1dfac157f3a2d1783f9dcb..de80e29938a446fdddaf9abe76f2089382cf5093 100644 (file)
@@ -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)
 
 /*
index 5459f73345f47284414415491550cc9badf86738..69290e6748cc98845ad038fa7114c36b269927c3 100644 (file)
@@ -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++)
   {