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

Go to the source code of this file.

Data Structures

struct  _ColormapInfo
 

Macros

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

Typedefs

typedef struct _ColormapInfo ColormapInfo
 

Functions

static MagickBooleanType IsColorCacheInstantiated (ExceptionInfo *)
 
static MagickBooleanType LoadColorCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
 
static LinkedListInfoAcquireColorCache (const char *filename, ExceptionInfo *exception)
 
MagickExport MagickBooleanType ColorComponentGenesis (void)
 
static void * DestroyColorElement (void *color_info)
 
MagickExport 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 MagickPixelPacket *pixel)
 
MagickExport void ConcatenateColorComponent (const MagickPixelPacket *pixel, const ChannelType 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 MagickPixelPacket *pixel, const ChannelType channel, char *tuple)
 
MagickExport void GetColorTuple (const MagickPixelPacket *pixel, const MagickBooleanType hex, char *tuple)
 
MagickExport MagickBooleanType IsColorSimilar (const Image *image, const PixelPacket *p, const PixelPacket *q)
 
MagickExport MagickBooleanType IsImageSimilar (const Image *image, const Image *target_image, ssize_t *x_offset, ssize_t *y_offset, ExceptionInfo *exception)
 
MagickPrivate MagickBooleanType IsIntensitySimilar (const Image *image, const PixelPacket *p, const PixelPacket *q)
 
MagickExport MagickBooleanType IsMagickColorSimilar (const MagickPixelPacket *p, const MagickPixelPacket *q)
 
MagickExport MagickBooleanType IsOpacitySimilar (const Image *image, const PixelPacket *p, const PixelPacket *q)
 
MagickExport MagickBooleanType ListColorInfo (FILE *file, ExceptionInfo *exception)
 
MagickExport MagickBooleanType QueryColorCompliance (const char *name, const ComplianceType compliance, PixelPacket *color, ExceptionInfo *exception)
 
MagickExport MagickBooleanType QueryColorDatabase (const char *name, PixelPacket *color, ExceptionInfo *exception)
 
MagickExport MagickBooleanType QueryColorname (const Image *image, const PixelPacket *color, const ComplianceType compliance, char *name, ExceptionInfo *exception)
 
static MagickStatusType ParseCSSColor (const char *magick_restrict color, GeometryInfo *geometry_info)
 
MagickExport MagickBooleanType QueryMagickColorCompliance (const char *name, const ComplianceType compliance, MagickPixelPacket *color, ExceptionInfo *exception)
 
MagickExport MagickBooleanType QueryMagickColor (const char *name, MagickPixelPacket *color, ExceptionInfo *exception)
 
MagickExport MagickBooleanType QueryMagickColorname (const Image *image, const MagickPixelPacket *color, const ComplianceType compliance, char *name, ExceptionInfo *exception)
 

Variables

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

Macro Definition Documentation

◆ ColorFilename

#define ColorFilename   "colors.xml"

Definition at line 75 of file color.c.

◆ SearchImageText

#define SearchImageText   " Searching image... "

◆ SVGCompliant

#define SVGCompliant (   component)
Value:
((double) \
ScaleCharToQuantum(ScaleQuantumToChar(ClampToQuantum(component))))
static Quantum ClampToQuantum(const MagickRealType quantum)
Definition: quantum.h:88

◆ SVGEpsilon

#define SVGEpsilon   1.0e-6

Typedef Documentation

◆ ColormapInfo

typedef struct _ColormapInfo ColormapInfo

Function Documentation

◆ AcquireColorCache()

◆ ColorCompare()

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

Definition at line 1355 of file color.c.

References LocaleCompare().

Referenced by GetColorList().

◆ ColorComponentGenesis()

MagickExport MagickBooleanType ColorComponentGenesis ( void  )

Definition at line 928 of file color.c.

References AllocateSemaphoreInfo(), color_semaphore, and MagickTrue.

Referenced by MagickCoreGenesis().

◆ ColorComponentTerminus()

◆ ColorInfoCompare()

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

Definition at line 1255 of file color.c.

References LocaleCompare().

Referenced by GetColorInfoList().

◆ ConcatenateColorComponent()

◆ ConcatentateHexColorComponent()

◆ DestroyColorElement()

static void * DestroyColorElement ( void *  color_info)
static

◆ GetColorCompliance()

◆ GetColorInfo()

MagickExport const ColorInfo * GetColorInfo ( const char *  name,
ExceptionInfo exception 
)

Definition at line 1095 of file color.c.

References AllCompliance, and GetColorCompliance().

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

◆ GetColorInfoList()

◆ GetColorList()

◆ GetColorTuple()

◆ IsColorCacheInstantiated()

static MagickBooleanType IsColorCacheInstantiated ( ExceptionInfo exception)
static

◆ IsColorSimilar()

◆ IsImageSimilar()

◆ IsIntensitySimilar()

MagickPrivate MagickBooleanType IsIntensitySimilar ( const Image image,
const PixelPacket p,
const PixelPacket q 
)

Definition at line 1886 of file color.c.

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

◆ IsMagickColorSimilar()

◆ IsOpacitySimilar()

MagickExport MagickBooleanType IsOpacitySimilar ( const Image image,
const PixelPacket p,
const PixelPacket q 
)

Definition at line 2064 of file color.c.

References _Image::fuzz, GetPixelOpacity, MagickFalse, MagickMax, MagickSQ1_2, MagickTrue, and _Image::matte.

Referenced by FuzzyOpacityCompare().

◆ IsSVGCompliant()

◆ ListColorInfo()

◆ LoadColorCache()

◆ ParseCSSColor()

◆ QueryColorCompliance()

◆ QueryColorDatabase()

◆ QueryColorname()

MagickExport MagickBooleanType QueryColorname ( const Image image,
const PixelPacket color,
const ComplianceType  compliance,
char *  name,
ExceptionInfo exception 
)

Definition at line 2521 of file color.c.

References GetMagickPixelPacket(), QueryMagickColorname(), and SetMagickPixelPacket().

Referenced by AnnotateImage(), and IdentifyImage().

◆ QueryMagickColor()

◆ QueryMagickColorCompliance()

MagickExport MagickBooleanType QueryMagickColorCompliance ( const char *  name,
const ComplianceType  compliance,
MagickPixelPacket color,
ExceptionInfo exception 
)

◆ QueryMagickColorname()

Variable Documentation

◆ color_cache

◆ color_semaphore

◆ Colormap

const ColormapInfo Colormap[]
static

Definition at line 101 of file color.c.

Referenced by AcquireColorCache().