MagickCore
7.0.0
|
#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 |
Macros | |
#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) |
MagickExport MagickBooleanType | QueryColorname (const Image *magick_unused(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 | ) |
Referenced by GetColorTuple().
typedef struct _ColorMapInfo ColorMapInfo |
|
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 AcquireSemaphoreInfo(), color_list, color_semaphore, DestroyColorElement(), DestroyLinkedList(), DestroySemaphoreInfo(), instantiate_color, LockSemaphoreInfo(), MagickFalse, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
|
static |
Definition at line 1149 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 _PixelInfo::alpha, AlphaPixelChannel, _PixelInfo::black, BlackPixelChannel, _PixelInfo::blue, BluePixelChannel, ClampToQuantum(), _PixelInfo::colorspace, ConcatenateMagickString(), _PixelInfo::depth, FormatLocaleString(), _PixelInfo::green, GreenPixelChannel, HCLColorspace, HCLpColorspace, HSBColorspace, HSIColorspace, HSLColorspace, HSVColorspace, HWBColorspace, MaxTextExtent, QuantumScale, _PixelInfo::red, RedPixelChannel, and SVGCompliance.
Referenced by GetColorTuple(), GetNumberColors(), and IdentifyImage().
|
static |
Definition at line 1334 of file color.c.
References _PixelInfo::alpha, AlphaPixelChannel, _PixelInfo::black, BlackPixelChannel, _PixelInfo::blue, BluePixelChannel, ClampToQuantum(), ConcatenateMagickString(), _PixelInfo::depth, FormatLocaleString(), _PixelInfo::green, GreenPixelChannel, MaxTextExtent, _PixelInfo::red, and RedPixelChannel.
Referenced by GetColorTuple().
|
static |
Definition at line 846 of file color.c.
References DestroyString(), _ColorInfo::exempt, IfMagickFalse, _ColorInfo::name, _ColorInfo::path, 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 color_list, color_semaphore, _ColorInfo::compliance, CopyMagickString(), GetMagickModule, GetNextValueInLinkedList(), GetValueFromLinkedList(), IfMagickFalse, IfMagickTrue, InitializeColorList(), InsertValueInLinkedList(), instantiate_color, IsLinkedListEmpty(), LocaleCompare(), LockSemaphoreInfo(), MaxTextExtent, _ColorInfo::name, OptionWarning, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), ThrowMagickException(), 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 AllCompliance, and GetColorCompliance().
Referenced by GetColorInfoList(), GetColorList(), and QueryColorname().
MagickExport const ColorInfo** GetColorInfoList | ( | const char * | pattern, |
size_t * | number_colors, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1166 of file color.c.
References AcquireQuantumMemory(), color_list, color_semaphore, ColorInfoCompare(), GetColorInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), IsMagickFalse, IsMagickTrue, 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 | ||
) |
Definition at line 1259 of file color.c.
References AcquireQuantumMemory(), color_list, color_semaphore, ColorCompare(), ConstantString(), GetColorInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), IsMagickFalse, IsMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _ColorInfo::name, ResetLinkedListIterator(), _ColorInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
MagickExport void GetColorTuple | ( | const PixelInfo * | pixel, |
const MagickBooleanType | hex, | ||
char * | tuple | ||
) |
Definition at line 1402 of file color.c.
References _PixelInfo::alpha, _PixelInfo::alpha_trait, AlphaPixelChannel, _PixelInfo::black, BlackPixelChannel, BlendPixelTrait, _PixelInfo::blue, BluePixelChannel, CMYKColorspace, _PixelInfo::colorspace, CommandOptionToMnemonic(), ConcatenateColorComponent(), ConcatenateMagickString(), ConcatentateHexColorComponent(), _PixelInfo::depth, GetMagickModule, GRAYColorspace, GrayPixelChannel, _PixelInfo::green, GreenPixelChannel, IfMagickTrue, IsMagickTrue, LocaleLower(), LogMagickEvent(), MagickColorspaceOptions, MagickEpsilon, MaxTextExtent, OpaqueAlpha, _PixelInfo::red, RedPixelChannel, SVGCompliance, SVGCompliant, and TraceEvent.
Referenced by GetNumberColors(), IdentifyImage(), ListColorInfo(), and QueryColorname().
|
static |
Definition at line 1510 of file color.c.
References AcquireSemaphoreInfo(), color_list, color_semaphore, ColorFilename, IfMagickFalse, IfMagickTrue, instantiate_color, LoadColorLists(), LockSemaphoreInfo(), MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetColorCompliance().
MagickExport MagickBooleanType IsEquivalentAlpha | ( | const Image * | image, |
const PixelInfo * | p, | ||
const PixelInfo * | q | ||
) |
Definition at line 1566 of file color.c.
References _PixelInfo::alpha, _Image::alpha_trait, BlendPixelTrait, _Image::fuzz, MagickFalse, MagickMax(), MagickSQ1_2, and MagickTrue.
MagickExport MagickBooleanType IsEquivalentImage | ( | const Image * | image, |
const Image * | target_image, | ||
ssize_t * | x_offset, | ||
ssize_t * | y_offset, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1623 of file color.c.
References AcquireVirtualCacheView(), _Image::columns, _Image::debug, DestroyCacheView(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelInfo(), GetPixelInfoPixel(), IfMagickFalse, IfMagickTrue, IsFuzzyEquivalencePixelInfo(), IsMagickTrue, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::progress_monitor, _Image::rows, SearchImageText, SetImageProgress(), _Image::signature, and TraceEvent.
MagickExport MagickBooleanType ListColorInfo | ( | FILE * | file, |
ExceptionInfo * | exception | ||
) |
Definition at line 1736 of file color.c.
References FormatLocaleFile(), GetColorInfoList(), GetColorTuple(), IfMagickTrue, LocaleCompare(), MagickFalse, MagickTrue, MaxTextExtent, _ColorInfo::path, RelinquishMagickMemory(), SVGCompliance, X11Compliance, and XPMCompliance.
|
static |
Definition at line 1826 of file color.c.
References AcquireMagickMemory(), AcquireString(), AllCompliance, AppendValueToLinkedList(), _ColorInfo::color, color_list, _ColorInfo::compliance, ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DirectorySeparator, _ColorInfo::exempt, FileToString(), GetMagickModule, GetMagickToken(), GetPathComponent(), GlobExpression(), HeadPath, IfMagickFalse, IfMagickTrue, IsStringTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, MaxTextExtent, _ColorInfo::name, NewLinkedList(), _ColorInfo::path, QueryColorCompliance(), 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 2043 of file color.c.
References AcquireMagickMemory(), _ColorMapInfo::alpha, _PixelInfo::alpha, AppendValueToLinkedList(), _ColorMapInfo::blue, _PixelInfo::blue, _ColorInfo::color, color_list, ColorMap, _ColorInfo::compliance, _ColorMapInfo::compliance, DestroyConfigureOptions(), _ColorInfo::exempt, GetConfigureOptions(), GetMagickModule, GetNextValueInLinkedList(), GetPixelInfo(), GetStringInfoDatum(), GetStringInfoPath(), _ColorMapInfo::green, _PixelInfo::green, IfMagickFalse, LoadColorList(), MagickFalse, MagickSignature, MagickTrue, _ColorInfo::name, _ColorMapInfo::name, NewLinkedList(), _ColorInfo::path, QuantumRange, _ColorMapInfo::red, _PixelInfo::red, ResetMagickMemory(), ResourceLimitError, _ColorInfo::signature, ThrowFileException, and ThrowMagickException().
Referenced by InitializeColorList().
|
inlinestatic |
Definition at line 1559 of file color.c.
Referenced by IsEquivalentAlpha().
MagickExport MagickBooleanType QueryColorCompliance | ( | const char * | name, |
const ComplianceType | compliance, | ||
PixelInfo * | color, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2151 of file color.c.
References AcquireString(), AllCompliance, _PixelInfo::alpha, _PixelPacket::alpha, _PixelInfo::alpha_trait, BackgroundColor, _PixelInfo::black, BlendPixelTrait, _PixelInfo::blue, _PixelPacket::blue, _GeometryInfo::chi, ChiValue, ClampToQuantum(), CMYKColorspace, _ColorInfo::color, _PixelInfo::colorspace, ConvertHCLToRGB(), ConvertHSBToRGB(), ConvertHSLToRGB(), ConvertHWBToRGB(), CopyMagickString(), DestroyString(), GetColorCompliance(), GetMagickModule, GetPixelInfo(), GetQuantumRange(), GRAYColorspace, _PixelInfo::green, _PixelPacket::green, HCLColorspace, HSBColorspace, HSLColorspace, HWBColorspace, IfMagickFalse, LocaleCompare(), LocaleLower(), LocaleNCompare(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickTrue, MaxTextExtent, OpaqueAlpha, OptionWarning, ParseCommandOption(), ParseGeometry(), PercentValue, _GeometryInfo::psi, PsiValue, QuantumRange, _PixelInfo::red, _PixelPacket::red, ResetMagickMemory(), RGBColorspace, _GeometryInfo::rho, RhoValue, ScaleAnyToQuantum(), SetGeometryInfo(), _GeometryInfo::sigma, SigmaValue, sRGBColorspace, SubstituteString(), ThrowMagickException(), TraceEvent, UndefinedPixelTrait, _GeometryInfo::xi, and XiValue.
Referenced by AcquireImage(), CompareImages(), DrawBoundingRectangles(), DrawClipPath(), DrawImage(), DrawPatternPath(), FloodfillPaintImage(), FxGetSymbol(), GetDrawInfo(), GetImageInfo(), LoadColorList(), MontageImageList(), PolaroidImage(), PreviewImage(), SetImageProperty(), ShadowImage(), SyncImageSettings(), and VignetteImage().
MagickExport MagickBooleanType QueryColorname | ( | const Image * | magick_unusedimage, |
const PixelInfo * | color, | ||
const ComplianceType | compliance, | ||
char * | name, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2499 of file color.c.
References _PixelInfo::alpha, _PixelInfo::alpha_trait, BlendPixelTrait, _PixelInfo::blue, _ColorInfo::color, color_list, _PixelInfo::colorspace, _ColorInfo::compliance, CopyMagickString(), _PixelInfo::depth, GetColorInfo(), GetColorTuple(), GetNextValueInLinkedList(), _PixelInfo::green, IfMagickFalse, IsMagickTrue, IssRGBColorspace(), MagickEpsilon, MagickFalse, MagickTrue, MaxTextExtent, _ColorInfo::name, OpaqueAlpha, _PixelInfo::red, ResetLinkedListIterator(), SVGCompliance, UndefinedPixelTrait, and XPMCompliance.
Referenced by GetNumberColors(), IdentifyImage(), and InterpretImageProperties().
|
static |
Definition at line 788 of file color.c.
Referenced by ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), InitializeColorList(), LoadColorList(), LoadColorLists(), and QueryColorname().
|
static |
Definition at line 791 of file color.c.
Referenced by ColorComponentGenesis(), ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), and InitializeColorList().
|
static |
Definition at line 102 of file color.c.
Referenced by LoadColorLists().
|
static |
Definition at line 794 of file color.c.
Referenced by ColorComponentTerminus(), GetColorCompliance(), and InitializeColorList().