|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/blob.h"#include "MagickCore/cache-view.h"#include "MagickCore/cache.h"#include "MagickCore/color.h"#include "MagickCore/color-private.h"#include "MagickCore/colorspace-private.h"#include "MagickCore/client.h"#include "MagickCore/configure.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/gem.h"#include "MagickCore/gem-private.h"#include "MagickCore/geometry.h"#include "MagickCore/image-private.h"#include "MagickCore/memory_.h"#include "MagickCore/monitor.h"#include "MagickCore/monitor-private.h"#include "MagickCore/option.h"#include "MagickCore/pixel-accessor.h"#include "MagickCore/quantize.h"#include "MagickCore/quantum.h"#include "MagickCore/quantum-private.h"#include "MagickCore/semaphore.h"#include "MagickCore/string_.h"#include "MagickCore/token.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.h"#include "MagickCore/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 *) |
| MagickPrivate MagickBooleanType | ColorComponentGenesis (void) |
| static void * | DestroyColorElement (void *color_info) |
| MagickPrivate 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 PixelInfo *pixel, const PixelChannel component, 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) |
| static double | MagickMax (const double x, const double y) |
| MagickExport 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) |
| MagickExport MagickBooleanType | ListColorInfo (FILE *file, ExceptionInfo *exception) |
| static MagickBooleanType | LoadColorList (const char *xml, const char *filename, const size_t depth, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | QueryColorCompliance (const char *name, const ComplianceType compliance, PixelInfo *color, ExceptionInfo *exception) |
| static double | MagickMin (const double x, const double y) |
| MagickExport MagickBooleanType | QueryColorname (const Image *image, const PixelInfo *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 76 of file color.c.
Referenced by InitializeColorList().
| #define SearchImageText " Searching image... " |
Referenced by IsEquivalentImage().
| #define SVGCompliant | ( | component | ) |
((MagickRealType) \ ScaleCharToQuantum(ScaleQuantumToChar(ClampToQuantum(component))))
Referenced by GetColorTuple().
| typedef struct _ColorMapInfo ColorMapInfo |
| static int ColorCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
| MagickPrivate MagickBooleanType ColorComponentGenesis | ( | void | ) |
Definition at line 821 of file color.c.
References AcquireSemaphoreInfo(), color_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickPrivate void ColorComponentTerminus | ( | void | ) |
Definition at line 863 of file color.c.
References color_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), color_list, DestroyLinkedList(), DestroyColorElement(), instantiate_color, MagickFalse, UnlockSemaphoreInfo(), and DestroySemaphoreInfo().
Referenced by MagickCoreTerminus().
| static int ColorInfoCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
Definition at line 1144 of file color.c.
References LocaleCompare().
Referenced by GetColorInfoList().
| MagickExport void ConcatenateColorComponent | ( | const PixelInfo * | pixel, |
| const PixelChannel | component, | ||
| const ComplianceType | compliance, | ||
| char * | tuple | ||
| ) |
Definition at line 1024 of file color.c.
References MaxTextExtent, RedPixelChannel, _PixelInfo::red, GreenPixelChannel, _PixelInfo::green, BluePixelChannel, _PixelInfo::blue, AlphaPixelChannel, _PixelInfo::alpha, BlackPixelChannel, _PixelInfo::black, SVGCompliance, _PixelInfo::depth, FormatLocaleString(), ClampToQuantum(), ConcatenateMagickString(), QuantumScale, _PixelInfo::colorspace, HSLColorspace, and HSBColorspace.
Referenced by GetColorTuple(), GetNumberColors(), and IdentifyImage().
| static void ConcatentateHexColorComponent | ( | const PixelInfo * | pixel, |
| const PixelChannel | channel, | ||
| char * | tuple | ||
| ) | [static] |
Definition at line 1329 of file color.c.
References MaxTextExtent, RedPixelChannel, _PixelInfo::red, GreenPixelChannel, _PixelInfo::green, BluePixelChannel, _PixelInfo::blue, AlphaPixelChannel, _PixelInfo::alpha, BlackPixelChannel, _PixelInfo::black, _PixelInfo::depth, FormatLocaleString(), ClampToQuantum(), and ConcatenateMagickString().
Referenced by GetColorTuple().
| static void* DestroyColorElement | ( | void * | color_info | ) | [static] |
Definition at line 846 of file color.c.
References _ColorInfo::exempt, MagickFalse, _ColorInfo::path, DestroyString(), _ColorInfo::name, and RelinquishMagickMemory().
Referenced by ColorComponentTerminus().
| MagickExport const ColorInfo* GetColorCompliance | ( | const char * | name, |
| const ComplianceType | compliance, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 903 of file color.c.
References MaxTextExtent, color_list, instantiate_color, MagickFalse, InitializeColorList(), IsLinkedListEmpty(), LocaleCompare(), GetValueFromLinkedList(), CopyMagickString(), LockSemaphoreInfo(), color_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _ColorInfo::compliance, _ColorInfo::name, ThrowMagickException(), GetMagickModule, OptionWarning, InsertValueInLinkedList(), RemoveElementByValueFromLinkedList(), and UnlockSemaphoreInfo().
Referenced by GetColorInfo(), and QueryColorCompliance().
| MagickExport const ColorInfo* GetColorInfo | ( | const char * | name, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 988 of file color.c.
References GetColorCompliance(), and AllCompliance.
Referenced by GetColorInfoList(), GetColorList(), and QueryColorname().
| MagickExport const ColorInfo** GetColorInfoList | ( | const char * | pattern, |
| size_t * | number_colors, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1161 of file color.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetColorInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), color_list, LockSemaphoreInfo(), color_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _ColorInfo::stealth, MagickFalse, GlobExpression(), _ColorInfo::name, UnlockSemaphoreInfo(), and ColorInfoCompare().
Referenced by ListColorInfo().
| MagickExport char** GetColorList | ( | const char * | pattern, |
| size_t * | number_colors, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1254 of file color.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetColorInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), color_list, LockSemaphoreInfo(), color_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _ColorInfo::stealth, MagickFalse, GlobExpression(), _ColorInfo::name, ConstantString(), UnlockSemaphoreInfo(), and ColorCompare().
| MagickExport void GetColorTuple | ( | const PixelInfo * | pixel, |
| const MagickBooleanType | hex, | ||
| char * | tuple | ||
| ) |
Definition at line 1397 of file color.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, MagickFalse, ConcatenateMagickString(), MaxTextExtent, ConcatentateHexColorComponent(), RedPixelChannel, GreenPixelChannel, BluePixelChannel, _PixelInfo::colorspace, CMYKColorspace, BlackPixelChannel, _PixelInfo::matte, _PixelInfo::alpha, OpaqueAlpha, AlphaPixelChannel, _PixelInfo::depth, _PixelInfo::red, SVGCompliant, MagickEpsilon, MagickTrue, _PixelInfo::green, _PixelInfo::blue, _PixelInfo::black, CommandOptionToMnemonic(), MagickColorspaceOptions, GRAYColorspace, ConcatenateColorComponent(), GrayPixelChannel, SVGCompliance, and LocaleLower().
Referenced by ListColorInfo(), QueryColorname(), GetNumberColors(), and IdentifyImage().
| static MagickBooleanType InitializeColorList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 1504 of file color.c.
References color_list, instantiate_color, MagickFalse, color_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), LoadColorLists(), ColorFilename, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetColorCompliance().
| MagickExport MagickBooleanType IsEquivalentAlpha | ( | const Image * | image, |
| const PixelInfo * | p, | ||
| const PixelInfo * | q | ||
| ) |
Definition at line 1560 of file color.c.
References _Image::matte, MagickFalse, MagickTrue, _PixelInfo::alpha, MagickMax(), _Image::fuzz, and MagickSQ1_2.
| MagickExport MagickBooleanType IsEquivalentImage | ( | const Image * | image, |
| const Image * | target_image, | ||
| ssize_t * | x_offset, | ||
| ssize_t * | y_offset, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1617 of file color.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, MagickTrue, GetPixelInfo(), AcquireCacheView(), _Image::rows, _Image::columns, GetCacheViewVirtualPixels(), GetPixelInfoPixel(), IsFuzzyEquivalencePixelInfo(), _Image::progress_monitor, SetImageProgress(), SearchImageText, and DestroyCacheView().
| MagickExport MagickBooleanType ListColorInfo | ( | FILE * | file, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1730 of file color.c.
References MaxTextExtent, GetColorInfoList(), MagickFalse, LocaleCompare(), FormatLocaleFile(), _ColorInfo::path, GetColorTuple(), SVGCompliance, X11Compliance, XPMCompliance, RelinquishMagickMemory(), and MagickTrue.
| static MagickBooleanType LoadColorList | ( | const char * | xml, |
| const char * | filename, | ||
| const size_t | depth, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1820 of file color.c.
References MaxTextExtent, LogMagickEvent(), ConfigureEvent, GetMagickModule, MagickFalse, color_list, NewLinkedList(), ThrowFileException, ResourceLimitError, MagickTrue, AcquireString(), GetMagickToken(), CopyMagickString(), LocaleNCompare(), LocaleCompare(), ThrowMagickException(), ConfigureError, GetPathComponent(), HeadPath, ConcatenateMagickString(), DirectorySeparator, FileToString(), RelinquishMagickMemory(), AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), _ColorInfo::path, ConstantString(), _ColorInfo::exempt, _ColorInfo::signature, MagickSignature, AppendValueToLinkedList(), _ColorInfo::name, QueryColorCompliance(), AllCompliance, _ColorInfo::color, _ColorInfo::compliance, GlobExpression(), SVGCompliance, X11Compliance, XPMCompliance, _ColorInfo::stealth, and IsMagickTrue().
Referenced by LoadColorLists().
| static MagickBooleanType LoadColorLists | ( | const char * | filename, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 2037 of file color.c.
References MagickFalse, color_list, NewLinkedList(), ThrowFileException, ResourceLimitError, ColorMap, AcquireMagickMemory(), ThrowMagickException(), GetMagickModule, _ColorInfo::name, ResetMagickMemory(), _ColorInfo::path, _ColorMapInfo::name, GetPixelInfo(), _ColorInfo::color, _PixelInfo::red, _ColorMapInfo::red, _PixelInfo::green, _ColorMapInfo::green, _PixelInfo::blue, _ColorMapInfo::blue, _PixelInfo::alpha, QuantumRange, _ColorMapInfo::alpha, _ColorInfo::compliance, _ColorMapInfo::compliance, _ColorInfo::exempt, MagickTrue, _ColorInfo::signature, MagickSignature, AppendValueToLinkedList(), GetConfigureOptions(), GetNextValueInLinkedList(), LoadColorList(), GetStringInfoDatum(), GetStringInfoPath(), and DestroyConfigureOptions().
Referenced by InitializeColorList().
| static double MagickMax | ( | const double | x, |
| const double | y | ||
| ) | [inline, static] |
Definition at line 1553 of file color.c.
Referenced by IsEquivalentAlpha().
| static double MagickMin | ( | const double | x, |
| const double | y | ||
| ) | [inline, static] |
Definition at line 2419 of file color.c.
Referenced by QueryColorname().
| MagickExport MagickBooleanType QueryColorCompliance | ( | const char * | name, |
| const ComplianceType | compliance, | ||
| PixelInfo * | color, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 2145 of file color.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetPixelInfo(), BackgroundColor, ResetMagickMemory(), MagickFalse, _PixelPacket::red, _PixelPacket::green, _PixelPacket::blue, ThrowMagickException(), OptionWarning, _PixelPacket::alpha, _PixelInfo::colorspace, RGBColorspace, _PixelInfo::matte, GetQuantumRange(), _PixelInfo::red, ScaleAnyToQuantum(), _PixelInfo::green, _PixelInfo::blue, _PixelInfo::alpha, OpaqueAlpha, MagickTrue, _PixelInfo::black, MaxTextExtent, CopyMagickString(), LocaleLower(), ParseCommandOption(), MagickColorspaceOptions, SetGeometryInfo(), ParseGeometry(), PercentValue, QuantumRange, RhoValue, ClampToQuantum(), _GeometryInfo::rho, SigmaValue, _GeometryInfo::sigma, XiValue, _GeometryInfo::xi, PsiValue, CMYKColorspace, _GeometryInfo::psi, ChiValue, _GeometryInfo::chi, LocaleCompare(), ConvertHSBToRGB(), ConvertHSLToRGB(), ConvertHWBToRGB(), GetColorCompliance(), and _ColorInfo::color.
Referenced by LoadColorList(), CompareImages(), DrawBoundingRectangles(), DrawClipPath(), DrawImage(), DrawPatternPath(), GetDrawInfo(), PreviewImage(), FxGetSymbol(), PolaroidImage(), ShadowImage(), VignetteImage(), AcquireImage(), GetImageInfo(), SyncImageSettings(), MontageImageList(), and SetImageProperty().
| MagickExport MagickBooleanType QueryColorname | ( | const Image * | image, |
| const PixelInfo * | color, | ||
| const ComplianceType | compliance, | ||
| char * | name, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 2426 of file color.c.
References XPMCompliance, _PixelInfo::matte, MagickFalse, _PixelInfo::depth, MagickMin(), _Image::depth, GetColorTuple(), SVGCompliance, MagickTrue, IsRGBColorspace(), _PixelInfo::colorspace, GetColorInfo(), ResetLinkedListIterator(), color_list, _Image::matte, _PixelInfo::alpha, OpaqueAlpha, GetNextValueInLinkedList(), _ColorInfo::compliance, _ColorInfo::color, _PixelInfo::red, MagickEpsilon, _PixelInfo::green, _PixelInfo::blue, CopyMagickString(), _ColorInfo::name, and MaxTextExtent.
Referenced by GetNumberColors(), IdentifyImage(), and GetImageProperty().
LinkedListInfo* color_list = (LinkedListInfo *) NULL [static] |
Definition at line 788 of file color.c.
Referenced by ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), InitializeColorList(), LoadColorList(), LoadColorLists(), and QueryColorname().
SemaphoreInfo* color_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 791 of file color.c.
Referenced by ColorComponentGenesis(), ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), and InitializeColorList().
const ColorMapInfo ColorMap[] [static] |
Definition at line 102 of file color.c.
Referenced by LoadColorLists().
volatile MagickBooleanType instantiate_color = MagickFalse [static] |
Definition at line 794 of file color.c.
Referenced by ColorComponentTerminus(), GetColorCompliance(), and InitializeColorList().