]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/colorspace-private.h
Add RobidouxSharp filter depreciate Bessel Filter and Static Gravity
[imagemagick] / MagickCore / colorspace-private.h
index ac58a0eff63b914ec7de995415929cd15d282e3e..9276a132f902c2f4ae69e0f103a91a42560c6b64 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
+  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
   dedicated to making software imaging solutions freely available.
   
   You may not use this file except in compliance with the License.
@@ -34,7 +34,9 @@ static inline void ConvertRGBToCMYK(PixelInfo *pixel)
     magenta,
     yellow;
                                                                                 
-  if ((pixel->red == 0) && (pixel->green == 0) && (pixel->blue == 0))
+  if ((fabs(pixel->red) < MagickEpsilon) &&
+      (fabs(pixel->green) < MagickEpsilon) &&
+      (fabs(pixel->blue) < MagickEpsilon))
     {
       pixel->black=(MagickRealType) QuantumRange;
       return;
@@ -66,10 +68,11 @@ static inline MagickBooleanType IsGrayColorspace(
   return(MagickFalse);
 }
 
-static inline MagickBooleanType IsRGBColorspace(const ColorspaceType colorspace)
+static inline MagickBooleanType IssRGBColorspace(
+  const ColorspaceType colorspace)
 {
   if ((IsGrayColorspace(colorspace) != MagickFalse) ||
-      (colorspace == RGBColorspace) || (colorspace == TransparentColorspace))
+      (colorspace == sRGBColorspace) || (colorspace == TransparentColorspace))
     return(MagickTrue);
   return(MagickFalse);
 }