MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
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)
static MagickStatusType ParseCSSColor (const char *magick_restrict color, GeometryInfo *geometry_info)
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

◆ ColorFilename

#define ColorFilename   "colors.xml"

Definition at line 78 of file color.c.

◆ IsColorComponentFactional

#define IsColorComponentFactional (   color)     ((color)-ScaleCharToQuantum(ScaleQuantumToChar(color)))

◆ SearchImageText

#define SearchImageText   " Searching image... "

◆ SVGCompliant

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

◆ 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 

Definition at line 1363 of file color.c.

References LocaleCompare().

Referenced by GetColorList().

◆ ColorComponentGenesis()

MagickPrivate MagickBooleanType ColorComponentGenesis ( void  )

Definition at line 927 of file color.c.

References AcquireSemaphoreInfo(), color_semaphore, and MagickTrue.

◆ ColorComponentTerminus()

◆ ColorInfoCompare()

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

Definition at line 1263 of file color.c.

References LocaleCompare().

Referenced by GetColorInfoList().

◆ ConcatenateColorComponent()

◆ ConcatentateHexColorComponent()

◆ DestroyColorElement()

static void * DestroyColorElement ( void *  color_info)

◆ GetColorCompliance()

◆ GetColorInfo()

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

Definition at line 1094 of file color.c.

References AllCompliance, and GetColorCompliance().

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

◆ GetColorInfoList()

◆ GetColorList()

◆ GetColorTuple()

◆ IsColorCacheInstantiated()

static MagickBooleanType IsColorCacheInstantiated ( ExceptionInfo exception)

◆ IsEquivalentAlpha()

MagickPrivate MagickBooleanType IsEquivalentAlpha ( const Image image,
const PixelInfo p,
const PixelInfo q 

◆ IsEquivalentImage()

◆ IsEquivalentIntensity()

MagickPrivate MagickBooleanType IsEquivalentIntensity ( const Image image,
const PixelInfo p,
const PixelInfo q 

Definition at line 1828 of file color.c.

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

◆ IsSVGCompliant()

◆ ListColorInfo()

◆ LoadColorCache()

◆ ParseCSSColor()

◆ QueryColorCompliance()

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

Definition at line 2270 of file color.c.

References AcquireString(), AllCompliance, _PixelInfo::alpha, _PixelPacket::alpha, _PixelInfo::alpha_trait, AlphaValue, 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, IsEventLogging(), LabColorspace, LocaleCompare(), LocaleLower(), LocaleNCompare(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickPathExtent, MagickTrue, OpaqueAlpha, OptionWarning, ParseCommandOption(), ParseCSSColor(), _GeometryInfo::psi, PsiValue, QuantumRange, QueryColorCompliance(), _PixelInfo::red, _PixelPacket::red, RGBColorspace, _GeometryInfo::rho, RhoValue, ScaleAnyToQuantum(), _GeometryInfo::sigma, SigmaValue, sRGBColorspace, SubstituteString(), ThrowMagickException(), TraceEvent, UndefinedPixelTrait, _GeometryInfo::xi, and XiValue.

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

◆ QueryColorname()

Variable Documentation

◆ color_cache

◆ color_semaphore

◆ Colormap

const ColormapInfo Colormap[]

Definition at line 104 of file color.c.

Referenced by AcquireColorCache().