MagickCore 6.9.12
|
#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/string-private.h"
#include "magick/token.h"
#include "magick/utility.h"
#include "magick/xml-tree.h"
#include "magick/xml-tree-private.h"
Go to the source code of this file.
Data Structures | |
struct | _ColormapInfo |
Macros | |
#define | ColorFilename "colors.xml" |
#define | SVGCompliant(component) |
#define | SVGEpsilon 1.0e-6 |
#define | SearchImageText " Searching image... " |
Typedefs | |
typedef struct _ColormapInfo | ColormapInfo |
Variables | |
static const ColormapInfo | Colormap [] |
static LinkedListInfo * | color_cache = (LinkedListInfo *) NULL |
static SemaphoreInfo * | color_semaphore = (SemaphoreInfo *) NULL |
#define SearchImageText " Searching image... " |
#define SVGCompliant | ( | component | ) |
#define SVGEpsilon 1.0e-6 |
typedef struct _ColormapInfo ColormapInfo |
|
static |
Definition at line 830 of file color.c.
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, _ColormapInfo::name, _ColorInfo::name, NewLinkedList(), _MagickPixelPacket::opacity, _ColorInfo::path, QuantumRange, _MagickPixelPacket::red, ResourceLimitError, ResourceLimitFatalError, _ColorInfo::signature, ThrowFatalException, and ThrowMagickException().
Referenced by IsColorCacheInstantiated().
|
static |
MagickExport MagickBooleanType ColorComponentGenesis | ( | void | ) |
Definition at line 928 of file color.c.
References AllocateSemaphoreInfo(), color_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
MagickExport void ColorComponentTerminus | ( | void | ) |
Definition at line 971 of file color.c.
References ActivateSemaphoreInfo(), color_cache, color_semaphore, DestroyColorElement(), DestroyLinkedList(), DestroySemaphoreInfo(), LockSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
|
static |
Definition at line 1255 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 1152 of file color.c.
References AlphaChannel, _MagickPixelPacket::blue, BlueChannel, _MagickPixelPacket::colorspace, ConcatenateMagickString(), _MagickPixelPacket::depth, FormatLocaleString(), GetMagickPrecision(), _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, IsHueCompatibleColorspace(), IssRGBCompatibleColorspace(), IsSVGCompliant(), LabColorspace, MagickFalse, MagickPathExtent, NoCompliance, _MagickPixelPacket::opacity, QuantumRange, QuantumScale, _MagickPixelPacket::red, and RedChannel.
Referenced by GetColorTuple(), GetNumberColors(), and IdentifyImage().
|
static |
Definition at line 1446 of file color.c.
References _MagickPixelPacket::blue, BlueChannel, ClampToQuantum(), ConcatenateMagickString(), _MagickPixelPacket::depth, FormatLocaleString(), _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, MaxTextExtent, _MagickPixelPacket::opacity, OpacityChannel, QuantumRange, _MagickPixelPacket::red, and RedChannel.
Referenced by GetColorTuple().
|
static |
Definition at line 954 of file color.c.
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 | ||
) |
Definition at line 1010 of file color.c.
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 | ||
) |
Definition at line 1095 of file color.c.
References AllCompliance, and GetColorCompliance().
Referenced by GetColorInfoList(), GetColorList(), and QueryMagickColorname().
MagickExport const ColorInfo ** GetColorInfoList | ( | const char * | pattern, |
size_t * | number_colors, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1276 of file color.c.
References AcquireQuantumMemory(), color_cache, color_semaphore, ColorInfoCompare(), GetColorInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), IsEventLogging(), 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 1370 of file color.c.
References AcquireQuantumMemory(), color_cache, color_semaphore, ColorCompare(), ConstantString(), GetColorInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), IsEventLogging(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _ColorInfo::name, ResetLinkedListIterator(), _ColorInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
MagickExport void GetColorTuple | ( | const MagickPixelPacket * | pixel, |
const MagickBooleanType | hex, | ||
char * | tuple | ||
) |
Definition at line 1514 of file color.c.
References AlphaChannel, _MagickPixelPacket::blue, BlueChannel, CMYKColorspace, _MagickPixelPacket::colorspace, CommandOptionToMnemonic(), ConcatenateColorComponent(), ConcatenateMagickString(), ConcatentateHexColorComponent(), _MagickPixelPacket::depth, GetMagickModule, GrayChannel, GRAYColorspace, _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, IsEventLogging(), 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(), and QueryMagickColorname().
|
static |
Definition at line 1616 of file color.c.
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 | ||
) |
Definition at line 1660 of file color.c.
References _PixelPacket::blue, _Image::colorspace, _Image::fuzz, GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelOpacity, GetPixelRed, _PixelPacket::green, IsHueCompatibleColorspace(), 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 | ||
) |
Definition at line 1761 of file color.c.
References AcquireVirtualCacheView(), _Image::columns, DestroyCacheView(), _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetMagickModule, GetMagickPixelPacket(), IsEventLogging(), 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 | ||
) |
Definition at line 1886 of file color.c.
References _Image::fuzz, GetPixelIntensity(), MagickFalse, MagickMax, MagickSQ1_2, and MagickTrue.
MagickExport MagickBooleanType IsMagickColorSimilar | ( | const MagickPixelPacket * | p, |
const MagickPixelPacket * | q | ||
) |
Definition at line 1952 of file color.c.
References _MagickPixelPacket::blue, CMYKColorspace, _MagickPixelPacket::colorspace, _MagickPixelPacket::fuzz, GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelOpacity, _MagickPixelPacket::green, _MagickPixelPacket::index, IsHueCompatibleColorspace(), IsMagickColorEqual(), MagickEpsilon, MagickFalse, MagickMax, MagickSQ1_2, MagickTrue, _MagickPixelPacket::matte, _MagickPixelPacket::opacity, OpaqueOpacity, QuantumRange, QuantumScale, and _MagickPixelPacket::red.
Referenced by CompareImageChannels(), ComparePixels(), CompositeImageChannel(), ConnectedComponentsImage(), FloodfillPaintImage(), GetEdgeBackgroundFactor(), GetImageBoundingBox(), IsImageSimilar(), OpaquePaintImageChannel(), and TransparentPaintImage().
MagickExport MagickBooleanType IsOpacitySimilar | ( | const Image * | image, |
const PixelPacket * | p, | ||
const PixelPacket * | q | ||
) |
Definition at line 2064 of file color.c.
References _Image::fuzz, GetPixelOpacity, MagickFalse, MagickMax, MagickSQ1_2, MagickTrue, and _Image::matte.
Referenced by FuzzyOpacityCompare().
|
inlinestatic |
Definition at line 1131 of file color.c.
References _MagickPixelPacket::blue, CMYKColorspace, _MagickPixelPacket::colorspace, _MagickPixelPacket::green, _MagickPixelPacket::index, MagickFalse, MagickTrue, _MagickPixelPacket::red, SVGCompliant, and SVGEpsilon.
Referenced by ConcatenateColorComponent().
MagickExport MagickBooleanType ListColorInfo | ( | FILE * | file, |
ExceptionInfo * | exception | ||
) |
Definition at line 2113 of file color.c.
References FormatLocaleFile(), GetColorInfoList(), GetColorTuple(), LocaleCompare(), MagickFalse, MagickTrue, MaxTextExtent, _ColorInfo::path, RelinquishMagickMemory(), SVGCompliance, X11Compliance, and XPMCompliance.
|
static |
Definition at line 2204 of file color.c.
References AcquireMagickMemory(), AcquireString(), AppendValueToLinkedList(), _ColorInfo::color, _ColorInfo::compliance, ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DirectorySeparator, _ColorInfo::exempt, FileToXML(), GetMagickModule, GetNextToken(), GetPathComponent(), HeadPath, IsMagickTrue(), LoadColorCache(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickMaxRecursionDepth, MagickTrue, MaxTextExtent, _ColorInfo::name, _ColorInfo::path, QueryMagickColor(), RelinquishMagickMemory(), ResourceLimitError, ResourceLimitFatalError, _ColorInfo::signature, _ColorInfo::stealth, StringLocateSubstring(), SVGCompliance, ThrowFatalException, ThrowMagickException(), X11Compliance, and XPMCompliance.
Referenced by AcquireColorCache(), and LoadColorCache().
|
static |
Definition at line 2566 of file color.c.
References AlphaValue, _GeometryInfo::chi, ChiValue, LocaleNCompare(), NoValue, _GeometryInfo::psi, PsiValue, _GeometryInfo::rho, RhoValue, SetGeometryInfo(), _GeometryInfo::sigma, SigmaValue, StringToDouble(), _GeometryInfo::xi, and XiValue.
Referenced by QueryMagickColorCompliance().
MagickExport MagickBooleanType QueryColorCompliance | ( | const char * | name, |
const ComplianceType | compliance, | ||
PixelPacket * | color, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2423 of file color.c.
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 | ||
) |
Definition at line 2482 of file color.c.
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 | ||
) |
Definition at line 2521 of file color.c.
References GetMagickPixelPacket(), QueryMagickColorname(), and SetMagickPixelPacket().
Referenced by AnnotateImage(), and IdentifyImage().
MagickExport MagickBooleanType QueryMagickColor | ( | const char * | name, |
MagickPixelPacket * | color, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 3044 of file color.c.
References AllCompliance, and QueryMagickColorCompliance().
Referenced by CompareImageChannels(), ConnectedComponentsImage(), FxGetSymbol(), GetEdgeBackgroundFactor(), LoadColorCache(), and QueryMagickColorCompliance().
MagickExport MagickBooleanType QueryMagickColorCompliance | ( | const char * | name, |
const ComplianceType | compliance, | ||
MagickPixelPacket * | color, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2650 of file color.c.
References AcquireString(), AlphaValue, BackgroundColor, _LongPixelPacket::blue, _MagickPixelPacket::blue, _PixelPacket::blue, _GeometryInfo::chi, ChiValue, ClampToQuantum(), CMYKColorspace, _ColorInfo::color, _MagickPixelPacket::colorspace, ConvertHCLToRGB(), ConvertHSBToRGB(), ConvertHSLToRGB(), ConvertHSVToRGB(), ConvertHWBToRGB(), CopyMagickString(), _MagickPixelPacket::depth, DestroyString(), GetColorCompliance(), GetMagickModule, GetMagickPixelPacket(), GetQuantumRange(), GRAYColorspace, _LongPixelPacket::green, _MagickPixelPacket::green, _PixelPacket::green, HCLColorspace, HSBColorspace, HSLColorspace, HSVColorspace, HWBColorspace, _MagickPixelPacket::index, IsEventLogging(), LabColorspace, LocaleCompare(), LocaleLower(), LocaleNCompare(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickPathExtent, MagickTrue, _MagickPixelPacket::matte, MaxTextExtent, _LongPixelPacket::opacity, _MagickPixelPacket::opacity, OpaqueOpacity, OptionWarning, ParseCommandOption(), ParseCSSColor(), _GeometryInfo::psi, PsiValue, QuantumRange, QueryMagickColor(), _LongPixelPacket::red, _MagickPixelPacket::red, _PixelPacket::red, RGBColorspace, _GeometryInfo::rho, RhoValue, ScaleAnyToQuantum(), _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 | ||
) |
Definition at line 3085 of file color.c.
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(), and QueryColorname().
|
static |
Definition at line 787 of file color.c.
Referenced by ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), IsColorCacheInstantiated(), and QueryMagickColorname().
|
static |
Definition at line 790 of file color.c.
Referenced by ColorComponentGenesis(), ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), and IsColorCacheInstantiated().
|
static |
Definition at line 101 of file color.c.
Referenced by AcquireColorCache().