18 #ifndef MAGICKCORE_COLOR_PRIVATE_H
19 #define MAGICKCORE_COLOR_PRIVATE_H
21 #include "MagickCore/image.h"
22 #include "MagickCore/image-private.h"
24 #if defined(__cplusplus) || defined(c_plusplus)
28 extern MagickPrivate MagickBooleanType
29 ColorComponentGenesis(
void),
33 extern MagickPrivate
void
34 ColorComponentTerminus(
void);
36 static inline MagickBooleanType GetColorRange(
const char *color,
40 start_color[MagickPathExtent] =
"white",
41 stop_color[MagickPathExtent] =
"black";
46 if (color == (
const char *) NULL)
53 (void) CopyMagickString(start_color,color,MagickPathExtent);
54 for (p=start_color; (*p !=
'-') && (*p !=
'\0'); p++)
57 for (p++; (*p !=
')') && (*p !=
'\0'); p++);
62 (void) CopyMagickString(stop_color,p+1,MagickPathExtent);
65 status=QueryColorCompliance(start_color,AllCompliance,start,exception);
66 if (status == MagickFalse)
68 return(QueryColorCompliance(stop_color,AllCompliance,stop,exception));
71 static inline double GetFuzzyColorDistance(
const Image *p,
const Image *q)
76 fuzz=(double) MagickMax(MagickMax(p->fuzz,q->fuzz),(MagickRealType)
81 #if defined(__cplusplus) || defined(c_plusplus)