#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/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"
Go to the source code of this file.
Data Structures | |
| struct | _ColorMapInfo |
Defines | |
| #define | ColorFilename "colors.xml" |
| #define | SVGCompliant(component) |
| #define | SearchImageText " Searching image... " |
Typedefs | |
| typedef struct _ColorMapInfo | ColorMapInfo |
Functions | |
| static MagickBooleanType | InitializeColorList (ExceptionInfo *) |
| static MagickBooleanType | LoadColorLists (const char *, ExceptionInfo *) |
| MagickExport MagickBooleanType | ColorComponentGenesis (void) |
| static void * | DestroyColorElement (void *color_info) |
| MagickExport void | ColorComponentTerminus (void) |
| 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, unsigned long *number_colors, ExceptionInfo *exception) |
| static int | ColorCompare (const void *x, const void *y) |
| MagickExport char ** | GetColorList (const char *pattern, unsigned long *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) |
| static double | MagickMax (const double x, const double y) |
| MagickExport MagickBooleanType | IsColorSimilar (const Image *image, const PixelPacket *p, const PixelPacket *q) |
| MagickExport MagickBooleanType | IsImageSimilar (const Image *image, const Image *target_image, long *x_offset, long *y_offset, ExceptionInfo *exception) |
| 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) |
| static MagickBooleanType | LoadColorList (const char *xml, const char *filename, const unsigned long depth, ExceptionInfo *exception) |
| static double | MagickMin (const double x, const double y) |
| 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 | 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_list = (LinkedListInfo *) NULL |
| static SemaphoreInfo * | color_semaphore = (SemaphoreInfo *) NULL |
| static volatile MagickBooleanType | instantiate_color = MagickFalse |
| #define ColorFilename "colors.xml" |
Definition at line 72 of file color.c.
Referenced by InitializeColorList().
| #define SearchImageText " Searching image... " |
Referenced by IsImageSimilar().
| #define SVGCompliant | ( | component | ) |
((MagickRealType) \ ScaleCharToQuantum(ScaleQuantumToChar(RoundToQuantum(component))));
Referenced by GetColorTuple().
| typedef struct _ColorMapInfo ColorMapInfo |
| static int ColorCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
| MagickExport MagickBooleanType ColorComponentGenesis | ( | void | ) |
Definition at line 817 of file color.c.
References AcquireSemaphoreInfo(), color_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickExport void ColorComponentTerminus | ( | void | ) |
Definition at line 859 of file color.c.
References AcquireSemaphoreInfo(), color_list, color_semaphore, DestroyColorElement(), DestroyLinkedList(), DestroySemaphoreInfo(), instantiate_color, LockSemaphoreInfo(), MagickFalse, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
| static int ColorInfoCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
Definition at line 1104 of file color.c.
References LocaleCompare().
Referenced by GetColorInfoList().
| MagickExport void ConcatenateColorComponent | ( | const MagickPixelPacket * | pixel, | |
| const ChannelType | channel, | |||
| const ComplianceType | compliance, | |||
| char * | tuple | |||
| ) |
Definition at line 984 of file color.c.
References AlphaChannel, _MagickPixelPacket::blue, BlueChannel, _MagickPixelPacket::colorspace, ConcatenateMagickString(), _MagickPixelPacket::depth, FormatMagickString(), _MagickPixelPacket::green, GreenChannel, HSBColorspace, HSLColorspace, _MagickPixelPacket::index, IndexChannel, MaxTextExtent, _MagickPixelPacket::opacity, OpacityChannel, QuantumRange, QuantumScale, _MagickPixelPacket::red, RedChannel, RoundToQuantum(), ScaleQuantumToChar(), ScaleQuantumToLong(), ScaleQuantumToShort(), and SVGCompliance.
Referenced by GetColorTuple(), GetNumberColors(), IdentifyImage(), and XMakeMagnifyImage().
| static void ConcatentateHexColorComponent | ( | const MagickPixelPacket * | pixel, | |
| const ChannelType | channel, | |||
| char * | tuple | |||
| ) | [static] |
Definition at line 1289 of file color.c.
References _MagickPixelPacket::blue, BlueChannel, ConcatenateMagickString(), _MagickPixelPacket::depth, FormatMagickString(), _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, MaxTextExtent, _MagickPixelPacket::opacity, OpacityChannel, QuantumRange, _MagickPixelPacket::red, RedChannel, RoundToQuantum(), ScaleQuantumToChar(), ScaleQuantumToLong(), and ScaleQuantumToShort().
Referenced by GetColorTuple().
| static void* DestroyColorElement | ( | void * | color_info | ) | [static] |
Definition at line 842 of file color.c.
References DestroyString(), _ColorInfo::exempt, MagickFalse, _ColorInfo::name, _ColorInfo::path, and RelinquishMagickMemory().
Referenced by ColorComponentTerminus().
| MagickExport const ColorInfo* GetColorInfo | ( | const char * | name, | |
| ExceptionInfo * | exception | |||
| ) |
Definition at line 900 of file color.c.
References color_list, color_semaphore, CopyMagickString(), GetMagickModule, GetNextValueInLinkedList(), GetValueFromLinkedList(), InitializeColorList(), InsertValueInLinkedList(), instantiate_color, IsLinkedListEmpty(), LocaleCompare(), LockSemaphoreInfo(), MagickFalse, MaxTextExtent, _ColorInfo::name, OptionWarning, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), ThrowMagickException(), and UnlockSemaphoreInfo().
Referenced by GetColorInfoList(), GetColorList(), QueryMagickColor(), and QueryMagickColorname().
| MagickExport const ColorInfo** GetColorInfoList | ( | const char * | pattern, | |
| unsigned long * | number_colors, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1121 of file color.c.
References AcquireQuantumMemory(), color_list, 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, | |
| unsigned long * | number_colors, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1214 of file color.c.
References AcquireQuantumMemory(), color_list, 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 | |||
| ) |
Definition at line 1356 of file color.c.
References AlphaChannel, _MagickPixelPacket::blue, BlueChannel, CMYKColorspace, _MagickPixelPacket::colorspace, ConcatenateColorComponent(), ConcatenateMagickString(), ConcatentateHexColorComponent(), _MagickPixelPacket::depth, GetMagickModule, _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, LocaleLower(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickOptionToMnemonic(), _MagickPixelPacket::matte, MaxTextExtent, _MagickPixelPacket::opacity, OpacityChannel, OpaqueOpacity, _MagickPixelPacket::red, RedChannel, SVGCompliance, SVGCompliant, and TraceEvent.
Referenced by GetNumberColors(), IdentifyImage(), ListColorInfo(), QueryMagickColorname(), and XMakeMagnifyImage().
| static MagickBooleanType InitializeColorList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 1453 of file color.c.
References AcquireSemaphoreInfo(), color_list, color_semaphore, ColorFilename, instantiate_color, LoadColorLists(), LockSemaphoreInfo(), MagickFalse, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetColorInfo().
| MagickExport MagickBooleanType IsColorSimilar | ( | const Image * | image, | |
| const PixelPacket * | p, | |||
| const PixelPacket * | q | |||
| ) |
Definition at line 1510 of file color.c.
References _PixelPacket::blue, _Image::fuzz, _PixelPacket::green, IsColorEqual(), MagickFalse, MagickMax(), MagickSQ1_2, MagickTrue, _Image::matte, _PixelPacket::opacity, QuantumRange, QuantumScale, and _PixelPacket::red.
Referenced by ColorFloodfillImage(), DrawPrimitive(), FuzzyColorCompare(), MatteFloodfillImage(), OpaqueImage(), and TransparentImage().
| MagickExport MagickBooleanType IsImageSimilar | ( | const Image * | image, | |
| const Image * | target_image, | |||
| long * | x_offset, | |||
| long * | y_offset, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1583 of file color.c.
References AcquireCacheView(), _Image::client_data, _Image::columns, _Image::debug, DestroyCacheView(), _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetMagickModule, GetMagickPixelPacket(), IsMagickColorSimilar(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::progress_monitor, QuantumTick(), _Image::rows, SearchImageText, SetMagickPixelPacket(), _Image::signature, and TraceEvent.
| MagickExport MagickBooleanType IsMagickColorSimilar | ( | const MagickPixelPacket * | p, | |
| const MagickPixelPacket * | q | |||
| ) |
Definition at line 1699 of file color.c.
References _MagickPixelPacket::blue, CMYKColorspace, _MagickPixelPacket::colorspace, _MagickPixelPacket::fuzz, _MagickPixelPacket::green, HSBColorspace, HSLColorspace, HWBColorspace, _MagickPixelPacket::index, IsMagickColorEqual(), MagickFalse, MagickMax(), MagickSQ1_2, MagickTrue, _MagickPixelPacket::matte, _MagickPixelPacket::opacity, QuantumRange, QuantumScale, and _MagickPixelPacket::red.
Referenced by CompareImageChannels(), ComparePixels(), CompositeImageChannel(), FloodfillPaintImage(), GetAbsoluteError(), GetImageBoundingBox(), IsImageSimilar(), OpaquePaintImageChannel(), and TransparentPaintImage().
| MagickExport MagickBooleanType IsOpacitySimilar | ( | const Image * | image, | |
| const PixelPacket * | p, | |||
| const PixelPacket * | q | |||
| ) |
Definition at line 1792 of file color.c.
References _Image::fuzz, MagickFalse, MagickMax(), MagickSQ1_2, MagickTrue, _Image::matte, and _PixelPacket::opacity.
Referenced by FuzzyOpacityCompare().
| MagickExport MagickBooleanType ListColorInfo | ( | FILE * | file, | |
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1840 of file color.c.
References GetColorInfoList(), GetColorTuple(), LocaleCompare(), MagickFalse, MagickTrue, MaxTextExtent, _ColorInfo::path, RelinquishMagickMemory(), SVGCompliance, X11Compliance, and XPMCompliance.
| static MagickBooleanType LoadColorList | ( | const char * | xml, | |
| const char * | filename, | |||
| const unsigned long | depth, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 1928 of file color.c.
References AcquireMagickMemory(), AcquireString(), AppendValueToLinkedList(), _ColorInfo::color, color_list, _ColorInfo::compliance, ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DirectorySeparator, _ColorInfo::exempt, FileToString(), GetMagickModule, GetMagickToken(), GetPathComponent(), GlobExpression(), HeadPath, IsMagickTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, MaxTextExtent, _ColorInfo::name, NewLinkedList(), _ColorInfo::path, QueryMagickColor(), RelinquishMagickMemory(), ResetMagickMemory(), ResourceLimitError, ResourceLimitFatalError, _ColorInfo::signature, _ColorInfo::stealth, SVGCompliance, ThrowFatalException, ThrowFileException, ThrowMagickException(), X11Compliance, and XPMCompliance.
Referenced by LoadColorLists().
| static MagickBooleanType LoadColorLists | ( | const char * | filename, | |
| ExceptionInfo * | exception | |||
| ) |
Definition at line 2144 of file color.c.
References AcquireMagickMemory(), _ColorMapInfo::alpha, AppendValueToLinkedList(), _ColorMapInfo::blue, _MagickPixelPacket::blue, _ColorInfo::color, color_list, ColorMap, _ColorMapInfo::compliance, _ColorInfo::compliance, DestroyConfigureOptions(), _ColorInfo::exempt, GetConfigureOptions(), GetMagickModule, GetMagickPixelPacket(), GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), _ColorMapInfo::green, _MagickPixelPacket::green, LoadColorList(), MagickFalse, MagickSignature, MagickTrue, _ColorMapInfo::name, _ColorInfo::name, NewLinkedList(), _MagickPixelPacket::opacity, _ColorInfo::path, QuantumRange, _ColorMapInfo::red, _MagickPixelPacket::red, ResetMagickMemory(), ResourceLimitError, ScaleCharToQuantum(), _ColorInfo::signature, ThrowFileException, and ThrowMagickException().
Referenced by InitializeColorList().
| static double MagickMax | ( | const double | x, | |
| const double | y | |||
| ) | [inline, static] |
Definition at line 1503 of file color.c.
Referenced by IsColorSimilar(), IsMagickColorSimilar(), and IsOpacitySimilar().
| static double MagickMin | ( | const double | x, | |
| const double | y | |||
| ) | [inline, static] |
Definition at line 2255 of file color.c.
Referenced by QueryColorDatabase(), and QueryMagickColorname().
| MagickExport MagickBooleanType QueryColorDatabase | ( | const char * | name, | |
| PixelPacket * | color, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 2262 of file color.c.
References _MagickPixelPacket::blue, _PixelPacket::blue, CMYKColorspace, _MagickPixelPacket::colorspace, _MagickPixelPacket::green, _PixelPacket::green, _MagickPixelPacket::index, MagickMin(), _MagickPixelPacket::opacity, _PixelPacket::opacity, QuantumRange, QuantumScale, QueryMagickColor(), _MagickPixelPacket::red, _PixelPacket::red, and RoundToQuantum().
Referenced by AcquireImage(), DrawBoundingRectangles(), DrawClipPath(), DrawImage(), DrawPatternPath(), GetDrawInfo(), GetImageInfo(), MontageImageList(), PolaroidImage(), PreviewImage(), ShadowImage(), SyncImageSettings(), and VignetteImage().
| MagickExport MagickBooleanType QueryColorname | ( | const Image * | image, | |
| const PixelPacket * | color, | |||
| const ComplianceType | compliance, | |||
| char * | name, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 2325 of file color.c.
References GetMagickPixelPacket(), QueryMagickColorname(), and SetMagickPixelPacket().
Referenced by IdentifyImage(), and XGetWindowColor().
| MagickExport MagickBooleanType QueryMagickColor | ( | const char * | name, | |
| MagickPixelPacket * | color, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 2366 of file color.c.
References BackgroundColor, _PixelPacket::blue, _MagickPixelPacket::blue, _LongPixelPacket::blue, _GeometryInfo::chi, ChiValue, CMYKColorspace, _ColorInfo::color, _MagickPixelPacket::colorspace, ConvertHSBToRGB(), ConvertHSLToRGB(), ConvertHWBToRGB(), CopyMagickString(), GetColorInfo(), GetMagickModule, GetMagickPixelPacket(), GetQuantumRange(), _PixelPacket::green, _MagickPixelPacket::green, _LongPixelPacket::green, _MagickPixelPacket::index, LocaleCompare(), LocaleLower(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickTrue, _MagickPixelPacket::matte, MaxTextExtent, _MagickPixelPacket::opacity, _LongPixelPacket::opacity, OpaqueOpacity, OptionWarning, ParseGeometry(), ParseMagickOption(), PercentValue, _GeometryInfo::psi, PsiValue, QuantumRange, _PixelPacket::red, _MagickPixelPacket::red, _LongPixelPacket::red, ResetMagickMemory(), RGBColorspace, _GeometryInfo::rho, RhoValue, RoundToQuantum(), ScaleAnyToQuantum(), ScaleCharToQuantum(), SetGeometryInfo(), _GeometryInfo::sigma, SigmaValue, ThrowMagickException(), TraceEvent, _GeometryInfo::xi, and XiValue.
Referenced by CompareImageChannels(), FxGetSymbol(), LoadColorList(), and QueryColorDatabase().
| MagickExport MagickBooleanType QueryMagickColorname | ( | const Image * | image, | |
| const MagickPixelPacket * | color, | |||
| const ComplianceType | compliance, | |||
| char * | name, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 2640 of file color.c.
References _MagickPixelPacket::blue, _ColorInfo::color, color_list, _ColorInfo::compliance, CopyMagickString(), _Image::depth, _MagickPixelPacket::depth, GetColorInfo(), GetColorTuple(), GetNextValueInLinkedList(), _MagickPixelPacket::green, 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_list = (LinkedListInfo *) NULL [static] |
Definition at line 784 of file color.c.
Referenced by ColorComponentTerminus(), GetColorInfo(), GetColorInfoList(), GetColorList(), InitializeColorList(), LoadColorList(), LoadColorLists(), and QueryMagickColorname().
SemaphoreInfo* color_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 787 of file color.c.
Referenced by ColorComponentGenesis(), ColorComponentTerminus(), GetColorInfo(), GetColorInfoList(), GetColorList(), and InitializeColorList().
const ColorMapInfo ColorMap[] [static] |
Definition at line 96 of file color.c.
Referenced by LoadColorLists().
volatile MagickBooleanType instantiate_color = MagickFalse [static] |
Definition at line 790 of file color.c.
Referenced by ColorComponentTerminus(), GetColorInfo(), and InitializeColorList().
1.6.1