MagickCore  7.0.10
color.c File Reference
Include dependency graph for color.c:

Go to the source code of this file.

Data Structures

struct  _ColormapInfo


#define ColorFilename   "colors.xml"
#define SVGCompliant(component)
#define SVGEpsilon   1.0e-6
#define IsColorComponentFactional(color)   ((color)-ScaleCharToQuantum(ScaleQuantumToChar(color)))
#define SearchImageText   " Searching image... "


typedef struct _ColormapInfo ColormapInfo


static MagickBooleanType IsColorCacheInstantiated (ExceptionInfo *)
static MagickBooleanType LoadColorCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
static LinkedListInfoAcquireColorCache (const char *filename, ExceptionInfo *exception)
MagickPrivate MagickBooleanType ColorComponentGenesis (void)
static void * DestroyColorElement (void *color_info)
MagickPrivate void ColorComponentTerminus (void)
MagickExport const ColorInfoGetColorCompliance (const char *name, const ComplianceType compliance, ExceptionInfo *exception)
MagickExport const ColorInfoGetColorInfo (const char *name, ExceptionInfo *exception)
static MagickBooleanType IsSVGCompliant (const PixelInfo *pixel)
MagickExport void ConcatenateColorComponent (const PixelInfo *pixel, const PixelChannel channel, const ComplianceType compliance, char *tuple)
static int ColorInfoCompare (const void *x, const void *y)
MagickExport const ColorInfo ** GetColorInfoList (const char *pattern, size_t *number_colors, ExceptionInfo *exception)
static int ColorCompare (const void *x, const void *y)
MagickExport char ** GetColorList (const char *pattern, size_t *number_colors, ExceptionInfo *exception)
static void ConcatentateHexColorComponent (const PixelInfo *pixel, const PixelChannel channel, char *tuple)
MagickExport void GetColorTuple (const PixelInfo *pixel, const MagickBooleanType hex, char *tuple)
MagickPrivate MagickBooleanType IsEquivalentAlpha (const Image *image, const PixelInfo *p, const PixelInfo *q)
MagickExport MagickBooleanType IsEquivalentImage (const Image *image, const Image *target_image, ssize_t *x_offset, ssize_t *y_offset, ExceptionInfo *exception)
MagickPrivate MagickBooleanType IsEquivalentIntensity (const Image *image, const PixelInfo *p, const PixelInfo *q)
MagickExport MagickBooleanType ListColorInfo (FILE *file, ExceptionInfo *exception)
MagickExport MagickBooleanType QueryColorCompliance (const char *name, const ComplianceType compliance, PixelInfo *color, ExceptionInfo *exception)
MagickExport MagickBooleanType QueryColorname (const Image *magick_unused(image), const PixelInfo *color, const ComplianceType compliance, char *name, ExceptionInfo *exception)


static const ColormapInfo Colormap []
static LinkedListInfocolor_cache = (LinkedListInfo *) NULL
static SemaphoreInfocolor_semaphore = (SemaphoreInfo *) NULL

Macro Definition Documentation

#define ColorFilename   "colors.xml"

Definition at line 78 of file color.c.

Referenced by IsColorCacheInstantiated().

#define IsColorComponentFactional (   color)    ((color)-ScaleCharToQuantum(ScaleQuantumToChar(color)))
#define SearchImageText   " Searching image... "

Referenced by IsEquivalentImage().

#define SVGCompliant (   component)
((double) \
static Quantum ClampToQuantum(const MagickRealType quantum)
Definition: quantum.h:85

Referenced by IsSVGCompliant().

#define SVGEpsilon   1.0e-6

Referenced by IsSVGCompliant().

Typedef Documentation

typedef struct _ColormapInfo ColormapInfo

Function Documentation

static int ColorCompare ( const void *  x,
const void *  y 

Definition at line 1360 of file color.c.

References LocaleCompare().

Referenced by GetColorList().

MagickPrivate MagickBooleanType ColorComponentGenesis ( void  )

Definition at line 925 of file color.c.

References AcquireSemaphoreInfo(), color_semaphore, and MagickTrue.

static int ColorInfoCompare ( const void *  x,
const void *  y 

Definition at line 1261 of file color.c.

References LocaleCompare().

Referenced by GetColorInfoList().

static void* DestroyColorElement ( void *  color_info)
MagickExport const ColorInfo* GetColorInfo ( const char *  name,
ExceptionInfo exception 

Definition at line 1092 of file color.c.

References AllCompliance, and GetColorCompliance().

Referenced by GetColorInfoList(), GetColorList(), and QueryColorname().

static MagickBooleanType IsColorCacheInstantiated ( ExceptionInfo exception)
MagickPrivate MagickBooleanType IsEquivalentAlpha ( const Image image,
const PixelInfo p,
const PixelInfo q 
MagickPrivate MagickBooleanType IsEquivalentIntensity ( const Image image,
const PixelInfo p,
const PixelInfo q 

Definition at line 1823 of file color.c.

References _Image::fuzz, GetPixelInfoIntensity(), MagickFalse, MagickMax, MagickSQ1_2, and MagickTrue.

MagickExport MagickBooleanType QueryColorCompliance ( const char *  name,
const ComplianceType  compliance,
PixelInfo color,
ExceptionInfo exception 

Definition at line 2180 of file color.c.

References AcquireString(), AllCompliance, _PixelInfo::alpha, _PixelPacket::alpha, _PixelInfo::alpha_trait, BackgroundColor, _PixelInfo::black, BlendPixelTrait, _PixelInfo::blue, _PixelPacket::blue, _GeometryInfo::chi, ChiValue, ClampToQuantum(), CMYKColorspace, _ColorInfo::color, _PixelInfo::colorspace, ConvertHCLToRGB(), ConvertHSBToRGB(), ConvertHSLToRGB(), ConvertHSVToRGB(), ConvertHWBToRGB(), CopyMagickString(), _PixelInfo::depth, DestroyString(), GetColorCompliance(), GetMagickModule, GetPixelInfo(), GetQuantumRange(), GRAYColorspace, _PixelInfo::green, _PixelPacket::green, HCLColorspace, HSBColorspace, HSLColorspace, HSVColorspace, HWBColorspace, LabColorspace, LocaleCompare(), LocaleLower(), LocaleNCompare(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickPathExtent, MagickTrue, OpaqueAlpha, OptionWarning, ParseCommandOption(), ParseGeometry(), PercentValue, _GeometryInfo::psi, PsiValue, QuantumRange, _PixelInfo::red, _PixelPacket::red, RGBColorspace, _GeometryInfo::rho, RhoValue, ScaleAnyToQuantum(), SetGeometryInfo(), _GeometryInfo::sigma, SigmaValue, sRGBColorspace, SubstituteString(), ThrowMagickException(), TraceEvent, UndefinedPixelTrait, _GeometryInfo::xi, and XiValue.

Referenced by AcquireImage(), CompareImages(), ConnectedComponentsImage(), DrawBoundingRectangles(), DrawClippingMask(), DrawCompositeMask(), DrawPatternPath(), FloodfillPaintImage(), FxGetSymbol(), GetColorRange(), GetDrawInfo(), GetEdgeBackgroundCensus(), GetEdgeBackgroundColor(), GetImageInfo(), KmeansImage(), LoadColorCache(), MontageImageList(), PolaroidImage(), PreviewImage(), RenderMVGContent(), SetImageProperty(), ShadowImage(), SyncImageSettings(), and VignetteImage().

Variable Documentation

const ColormapInfo Colormap[]

Definition at line 104 of file color.c.

Referenced by AcquireColorCache().