#include "magick/studio.h"
#include "magick/blob.h"
#include "magick/cache-view.h"
#include "magick/cache.h"
#include "magick/color.h"
#include "magick/color-private.h"
#include "magick/colorspace-private.h"
#include "magick/client.h"
#include "magick/configure.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/gem.h"
#include "magick/geometry.h"
#include "magick/image-private.h"
#include "magick/memory_.h"
#include "magick/monitor.h"
#include "magick/monitor-private.h"
#include "magick/option.h"
#include "magick/pixel-private.h"
#include "magick/quantize.h"
#include "magick/quantum.h"
#include "magick/semaphore.h"
#include "magick/string_.h"
#include "magick/token.h"
#include "magick/utility.h"
#include "magick/xml-tree.h"
#include "magick/xml-tree-private.h"
Data Structures | |
struct | _ColormapInfo |
Defines | |
#define | ColorFilename "colors.xml" |
#define | SVGCompliant(component) |
#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 LinkedListInfo * | AcquireColorCache (const char *filename, ExceptionInfo *exception) |
MagickExport MagickBooleanType | ColorComponentGenesis (void) |
static void * | DestroyColorElement (void *color_info) |
MagickExport void | ColorComponentTerminus (void) |
MagickExport const ColorInfo * | GetColorCompliance (const char *name, const ComplianceType compliance, ExceptionInfo *exception) |
MagickExport const ColorInfo * | GetColorInfo (const char *name, ExceptionInfo *exception) |
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) |
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 LinkedListInfo * | color_cache = (LinkedListInfo *) NULL |
static SemaphoreInfo * | color_semaphore = (SemaphoreInfo *) NULL |
#define ColorFilename "colors.xml" |
Referenced by IsColorCacheInstantiated().
#define SearchImageText " Searching image... " |
Referenced by IsImageSimilar().
#define SVGCompliant | ( | component | ) |
((MagickRealType) \ ScaleCharToQuantum(ScaleQuantumToChar(ClampToQuantum(component))));
Referenced by GetColorTuple().
typedef struct _ColormapInfo ColormapInfo |
static LinkedListInfo* AcquireColorCache | ( | const char * | filename, | |
ExceptionInfo * | exception | |||
) | [static] |
References AcquireMagickMemory(), _ColormapInfo::alpha, AppendValueToLinkedList(), _MagickPixelPacket::blue, _ColorInfo::color, Colormap, _ColormapInfo::compliance, _ColorInfo::compliance, DestroyConfigureOptions(), _ColorInfo::exempt, GetConfigureOptions(), GetMagickModule, GetMagickPixelPacket(), GetNextValueInLinkedList(), GetPixelBlue, GetPixelGreen, GetPixelRed, GetStringInfoDatum(), GetStringInfoPath(), _MagickPixelPacket::green, LoadColorCache(), MagickCoreSignature, MagickFalse, MagickTrue, _ColorInfo::name, _ColormapInfo::name, NewLinkedList(), _MagickPixelPacket::opacity, _ColorInfo::path, QuantumRange, _MagickPixelPacket::red, ResourceLimitError, ResourceLimitFatalError, ScaleCharToQuantum(), _ColorInfo::signature, ThrowFatalException, and ThrowMagickException().
Referenced by IsColorCacheInstantiated().
static int ColorCompare | ( | const void * | x, | |
const void * | y | |||
) | [static] |
References LocaleCompare().
Referenced by GetColorList().
MagickExport MagickBooleanType ColorComponentGenesis | ( | void | ) |
References AllocateSemaphoreInfo(), color_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
MagickExport void ColorComponentTerminus | ( | void | ) |
References ActivateSemaphoreInfo(), color_cache, color_semaphore, DestroyColorElement(), DestroyLinkedList(), DestroySemaphoreInfo(), LockSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
static int ColorInfoCompare | ( | const void * | x, | |
const void * | y | |||
) | [static] |
References LocaleCompare().
Referenced by GetColorInfoList().
MagickExport void ConcatenateColorComponent | ( | const MagickPixelPacket * | pixel, | |
const ChannelType | channel, | |||
const ComplianceType | compliance, | |||
char * | tuple | |||
) |
References AlphaChannel, _MagickPixelPacket::blue, BlueChannel, ClampToQuantum(), _MagickPixelPacket::colorspace, ConcatenateMagickString(), _MagickPixelPacket::depth, FormatLocaleString(), GetMagickPrecision(), _MagickPixelPacket::green, GreenChannel, HCLColorspace, HCLpColorspace, HSBColorspace, HSIColorspace, HSLColorspace, HSVColorspace, HWBColorspace, _MagickPixelPacket::index, IndexChannel, LabColorspace, MaxTextExtent, NoCompliance, _MagickPixelPacket::opacity, OpacityChannel, QuantumRange, QuantumScale, _MagickPixelPacket::red, RedChannel, ScaleQuantumToChar(), ScaleQuantumToLong(), ScaleQuantumToShort(), and SVGCompliance.
Referenced by GetColorTuple(), GetNumberColors(), IdentifyImage(), and XMakeMagnifyImage().
static void ConcatentateHexColorComponent | ( | const MagickPixelPacket * | pixel, | |
const ChannelType | channel, | |||
char * | tuple | |||
) | [static] |
References _MagickPixelPacket::blue, BlueChannel, ClampToQuantum(), ConcatenateMagickString(), _MagickPixelPacket::depth, FormatLocaleString(), _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, MaxTextExtent, _MagickPixelPacket::opacity, OpacityChannel, QuantumRange, _MagickPixelPacket::red, RedChannel, ScaleQuantumToChar(), ScaleQuantumToLong(), and ScaleQuantumToShort().
Referenced by GetColorTuple().
static void* DestroyColorElement | ( | void * | color_info | ) | [static] |
References DestroyString(), _ColorInfo::exempt, MagickFalse, _ColorInfo::name, _ColorInfo::path, and RelinquishMagickMemory().
Referenced by ColorComponentTerminus().
MagickExport const ColorInfo* GetColorCompliance | ( | const char * | name, | |
const ComplianceType | compliance, | |||
ExceptionInfo * | exception | |||
) |
References color_cache, color_semaphore, _ColorInfo::compliance, CopyMagickString(), GetMagickModule, GetNextValueInLinkedList(), InsertValueInLinkedList(), IsColorCacheInstantiated(), LocaleCompare(), LockSemaphoreInfo(), MagickFalse, MaxTextExtent, _ColorInfo::name, OptionWarning, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), ThrowMagickException(), and UnlockSemaphoreInfo().
Referenced by GetColorInfo(), and QueryMagickColorCompliance().
MagickExport const ColorInfo* GetColorInfo | ( | const char * | name, | |
ExceptionInfo * | exception | |||
) |
References AllCompliance, and GetColorCompliance().
Referenced by GetColorInfoList(), GetColorList(), and QueryMagickColorname().
MagickExport const ColorInfo** GetColorInfoList | ( | const char * | pattern, | |
size_t * | number_colors, | |||
ExceptionInfo * | exception | |||
) |
References AcquireQuantumMemory(), color_cache, color_semaphore, ColorInfoCompare(), GetColorInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _ColorInfo::name, ResetLinkedListIterator(), _ColorInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
Referenced by ListColorInfo().
MagickExport char** GetColorList | ( | const char * | pattern, | |
size_t * | number_colors, | |||
ExceptionInfo * | exception | |||
) |
References AcquireQuantumMemory(), color_cache, color_semaphore, ColorCompare(), ConstantString(), GetColorInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _ColorInfo::name, ResetLinkedListIterator(), _ColorInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
Referenced by XColorBrowserWidget().
MagickExport void GetColorTuple | ( | const MagickPixelPacket * | pixel, | |
const MagickBooleanType | hex, | |||
char * | tuple | |||
) |
References AlphaChannel, _MagickPixelPacket::blue, BlueChannel, CMYKColorspace, _MagickPixelPacket::colorspace, CommandOptionToMnemonic(), ConcatenateColorComponent(), ConcatenateMagickString(), ConcatentateHexColorComponent(), _MagickPixelPacket::depth, GetMagickModule, GrayChannel, GRAYColorspace, _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, LinearGRAYColorspace, LocaleLower(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, _MagickPixelPacket::matte, MaxTextExtent, _MagickPixelPacket::opacity, OpacityChannel, _MagickPixelPacket::red, RedChannel, SVGCompliance, SVGCompliant, and TraceEvent.
Referenced by ConnectedComponentsImage(), GetImageProperty(), GetNumberColors(), IdentifyImage(), ListColorInfo(), QueryMagickColorname(), and XMakeMagnifyImage().
static MagickBooleanType IsColorCacheInstantiated | ( | ExceptionInfo * | exception | ) | [static] |
References AcquireColorCache(), ActivateSemaphoreInfo(), color_cache, color_semaphore, ColorFilename, LockSemaphoreInfo(), MagickFalse, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetColorCompliance().
MagickExport MagickBooleanType IsColorSimilar | ( | const Image * | image, | |
const PixelPacket * | p, | |||
const PixelPacket * | q | |||
) |
References _PixelPacket::blue, _Image::colorspace, _Image::fuzz, GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelOpacity, GetPixelRed, _PixelPacket::green, HCLColorspace, HSBColorspace, HSLColorspace, HWBColorspace, MagickEpsilon, MagickFalse, MagickMax, MagickSQ1_2, MagickTrue, _Image::matte, _PixelPacket::opacity, OpaqueOpacity, QuantumRange, and QuantumScale.
Referenced by ColorFloodfillImage(), ConnectedComponentsImage(), DrawPrimitive(), FuzzyColorCompare(), MatteFloodfillImage(), OpaqueImage(), and TransparentImage().
MagickExport MagickBooleanType IsImageSimilar | ( | const Image * | image, | |
const Image * | target_image, | |||
ssize_t * | x_offset, | |||
ssize_t * | y_offset, | |||
ExceptionInfo * | exception | |||
) |
References AcquireVirtualCacheView(), _Image::columns, _Image::debug, DestroyCacheView(), _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetMagickModule, GetMagickPixelPacket(), IsMagickColorSimilar(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _Image::progress_monitor, _Image::rows, SearchImageText, SetImageProgress(), SetMagickPixelPacket(), _Image::signature, and TraceEvent.
MagickPrivate MagickBooleanType IsIntensitySimilar | ( | const Image * | image, | |
const PixelPacket * | p, | |||
const PixelPacket * | q | |||
) |
References _Image::fuzz, GetPixelIntensity(), MagickFalse, MagickMax, MagickSQ1_2, and MagickTrue.
MagickExport MagickBooleanType IsMagickColorSimilar | ( | const MagickPixelPacket * | p, | |
const MagickPixelPacket * | q | |||
) |
References _MagickPixelPacket::blue, CMYKColorspace, _MagickPixelPacket::colorspace, _MagickPixelPacket::fuzz, GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelOpacity, _MagickPixelPacket::green, HCLColorspace, HSBColorspace, HSLColorspace, HWBColorspace, _MagickPixelPacket::index, IsMagickColorEqual(), MagickEpsilon, MagickFalse, MagickMax, MagickSQ1_2, MagickTrue, _MagickPixelPacket::matte, _MagickPixelPacket::opacity, OpaqueOpacity, QuantumRange, QuantumScale, and _MagickPixelPacket::red.
Referenced by CompareImageChannels(), ComparePixels(), CompositeImageChannel(), FloodfillPaintImage(), GetEdgeBackgroundFactor(), GetImageBoundingBox(), IsImageSimilar(), OpaquePaintImageChannel(), and TransparentPaintImage().
MagickExport MagickBooleanType IsOpacitySimilar | ( | const Image * | image, | |
const PixelPacket * | p, | |||
const PixelPacket * | q | |||
) |
References _Image::fuzz, GetPixelOpacity, MagickFalse, MagickMax, MagickSQ1_2, MagickTrue, and _Image::matte.
Referenced by FuzzyOpacityCompare().
MagickExport MagickBooleanType ListColorInfo | ( | FILE * | file, | |
ExceptionInfo * | exception | |||
) |
static MagickBooleanType LoadColorCache | ( | LinkedListInfo * | cache, | |
const char * | xml, | |||
const char * | filename, | |||
const size_t | depth, | |||
ExceptionInfo * | exception | |||
) |
References AcquireMagickMemory(), AcquireString(), AppendValueToLinkedList(), _ColorInfo::color, _ColorInfo::compliance, ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DirectorySeparator, _ColorInfo::exempt, FileToXML(), GetMagickModule, GetNextToken(), GetPathComponent(), GlobExpression(), HeadPath, IsMagickTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickMaxRecursionDepth, MagickTrue, MaxTextExtent, _ColorInfo::name, _ColorInfo::path, QueryMagickColor(), RelinquishMagickMemory(), ResourceLimitError, ResourceLimitFatalError, _ColorInfo::signature, _ColorInfo::stealth, SVGCompliance, ThrowFatalException, ThrowMagickException(), X11Compliance, and XPMCompliance.
Referenced by AcquireColorCache().
MagickExport MagickBooleanType QueryColorCompliance | ( | const char * | name, | |
const ComplianceType | compliance, | |||
PixelPacket * | color, | |||
ExceptionInfo * | exception | |||
) |
References _MagickPixelPacket::blue, ClampToQuantum(), CMYKColorspace, _MagickPixelPacket::colorspace, _MagickPixelPacket::green, _MagickPixelPacket::index, MagickMin, _MagickPixelPacket::opacity, QuantumRange, QuantumScale, QueryMagickColorCompliance(), _MagickPixelPacket::red, SetPixelBlue, SetPixelGreen, SetPixelOpacity, and SetPixelRed.
Referenced by DrawClippingMask(), DrawCompositeMask(), and QueryColorDatabase().
MagickExport MagickBooleanType QueryColorDatabase | ( | const char * | name, | |
PixelPacket * | color, | |||
ExceptionInfo * | exception | |||
) |
References AllCompliance, and QueryColorCompliance().
Referenced by AcquireImage(), DrawBoundingRectangles(), DrawPatternPath(), GetDrawInfo(), GetImageInfo(), MontageImageList(), PolaroidImage(), PreviewImage(), RenderMVGContent(), SetImageProperty(), ShadowImage(), SyncImageSettings(), and VignetteImage().
MagickExport MagickBooleanType QueryColorname | ( | const Image * | image, | |
const PixelPacket * | color, | |||
const ComplianceType | compliance, | |||
char * | name, | |||
ExceptionInfo * | exception | |||
) |
References GetMagickPixelPacket(), QueryMagickColorname(), and SetMagickPixelPacket().
Referenced by IdentifyImage(), and XGetWindowColor().
MagickExport MagickBooleanType QueryMagickColor | ( | const char * | name, | |
MagickPixelPacket * | color, | |||
ExceptionInfo * | exception | |||
) |
References AllCompliance, and QueryMagickColorCompliance().
Referenced by CompareImageChannels(), FxGetSymbol(), LoadColorCache(), and QueryMagickColorCompliance().
MagickExport MagickBooleanType QueryMagickColorCompliance | ( | const char * | name, | |
const ComplianceType | compliance, | |||
MagickPixelPacket * | color, | |||
ExceptionInfo * | exception | |||
) |
References AcquireString(), BackgroundColor, _PixelPacket::blue, _MagickPixelPacket::blue, _LongPixelPacket::blue, _GeometryInfo::chi, ChiValue, ClampToQuantum(), CMYKColorspace, _ColorInfo::color, _MagickPixelPacket::colorspace, ConvertHCLToRGB(), ConvertHSBToRGB(), ConvertHSLToRGB(), ConvertHWBToRGB(), CopyMagickString(), _MagickPixelPacket::depth, DestroyString(), GetColorCompliance(), GetMagickModule, GetMagickPixelPacket(), GetQuantumRange(), GRAYColorspace, _PixelPacket::green, _MagickPixelPacket::green, _LongPixelPacket::green, _MagickPixelPacket::index, LabColorspace, LinearGRAYColorspace, LocaleCompare(), LocaleLower(), LocaleNCompare(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickTrue, _MagickPixelPacket::matte, MaxTextExtent, _MagickPixelPacket::opacity, _LongPixelPacket::opacity, OpaqueOpacity, OptionWarning, ParseCommandOption(), ParseGeometry(), PercentValue, _GeometryInfo::psi, PsiValue, QuantumRange, QueryMagickColor(), _PixelPacket::red, _MagickPixelPacket::red, _LongPixelPacket::red, RGBColorspace, _GeometryInfo::rho, RhoValue, ScaleAnyToQuantum(), ScaleCharToQuantum(), SetGeometryInfo(), _GeometryInfo::sigma, SigmaValue, sRGBColorspace, SubstituteString(), ThrowMagickException(), TraceEvent, _GeometryInfo::xi, and XiValue.
Referenced by QueryColorCompliance(), and QueryMagickColor().
MagickExport MagickBooleanType QueryMagickColorname | ( | const Image * | image, | |
const MagickPixelPacket * | color, | |||
const ComplianceType | compliance, | |||
char * | name, | |||
ExceptionInfo * | exception | |||
) |
References _MagickPixelPacket::blue, _ColorInfo::color, color_cache, _MagickPixelPacket::colorspace, _ColorInfo::compliance, CopyMagickString(), _Image::depth, _MagickPixelPacket::depth, GetColorInfo(), GetColorTuple(), GetNextValueInLinkedList(), _MagickPixelPacket::green, IssRGBColorspace(), MagickFalse, MagickMin, MagickTrue, _Image::matte, _MagickPixelPacket::matte, MaxTextExtent, _ColorInfo::name, _MagickPixelPacket::opacity, OpaqueOpacity, _MagickPixelPacket::red, ResetLinkedListIterator(), SVGCompliance, and XPMCompliance.
Referenced by GetImageProperty(), GetNumberColors(), IdentifyImage(), QueryColorname(), and XMakeMagnifyImage().
LinkedListInfo* color_cache = (LinkedListInfo *) NULL [static] |
SemaphoreInfo* color_semaphore = (SemaphoreInfo *) NULL [static] |
const ColormapInfo Colormap[] [static] |