MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#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/string-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
#include "MagickCore/xml-tree.h"
#include "MagickCore/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 | IsColorComponentFactional(color) ((color)-ScaleCharToQuantum(ScaleQuantumToChar(color))) |
#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 IsColorComponentFactional | ( | color | ) | ((color)-ScaleCharToQuantum(ScaleQuantumToChar(color))) |
#define SearchImageText " Searching image... " |
#define SVGCompliant | ( | component | ) |
#define SVGEpsilon 1.0e-6 |
typedef struct _ColormapInfo ColormapInfo |
|
static |
Definition at line 833 of file color.c.
References AcquireMagickMemory(), _ColormapInfo::alpha, _PixelInfo::alpha, AppendValueToLinkedList(), _ColormapInfo::blue, _PixelInfo::blue, _ColorInfo::color, Colormap, _ColormapInfo::compliance, _ColorInfo::compliance, DestroyConfigureOptions(), _ColorInfo::exempt, GetConfigureOptions(), GetMagickModule, GetNextValueInLinkedList(), GetPixelInfo(), GetStringInfoDatum(), GetStringInfoPath(), _ColormapInfo::green, _PixelInfo::green, LoadColorCache(), magick_unreferenced, MagickCoreSignature, MagickFalse, MagickTrue, _ColormapInfo::name, _ColorInfo::name, NewLinkedList(), _ColorInfo::path, QuantumRange, _ColormapInfo::red, _PixelInfo::red, ResourceLimitError, _ColorInfo::signature, and ThrowMagickException().
Referenced by IsColorCacheInstantiated().
|
static |
MagickPrivate MagickBooleanType ColorComponentGenesis | ( | void | ) |
Definition at line 927 of file color.c.
References AcquireSemaphoreInfo(), color_semaphore, and MagickTrue.
MagickPrivate void ColorComponentTerminus | ( | void | ) |
Definition at line 970 of file color.c.
References ActivateSemaphoreInfo(), color_cache, color_semaphore, DestroyColorElement(), DestroyLinkedList(), LockSemaphoreInfo(), RelinquishSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
|
static |
Definition at line 1263 of file color.c.
References LocaleCompare().
Referenced by GetColorInfoList().
MagickExport void ConcatenateColorComponent | ( | const PixelInfo * | pixel, |
const PixelChannel | channel, | ||
const ComplianceType | compliance, | ||
char * | tuple | ||
) |
Definition at line 1152 of file color.c.
References _PixelInfo::alpha, AlphaPixelChannel, _PixelInfo::black, BlackPixelChannel, _PixelInfo::blue, BluePixelChannel, _PixelInfo::colorspace, ConcatenateMagickString(), _PixelInfo::depth, FormatLocaleString(), GetMagickPrecision(), _PixelInfo::green, GreenPixelChannel, _PixelInfo::index, IndexPixelChannel, IsHueCompatibleColorspace(), IssRGBCompatibleColorspace(), IsSVGCompliant(), LabColorspace, MagickFalse, MagickPathExtent, NoCompliance, QuantumRange, QuantumScale, _PixelInfo::red, and RedPixelChannel.
Referenced by GetColorTuple(), GetNumberColors(), and IdentifyImage().
|
static |
Definition at line 1454 of file color.c.
References _PixelInfo::alpha, AlphaPixelChannel, _PixelInfo::black, BlackPixelChannel, _PixelInfo::blue, BluePixelChannel, ClampToQuantum(), ConcatenateMagickString(), _PixelInfo::depth, FormatLocaleString(), _PixelInfo::green, GreenPixelChannel, MagickPathExtent, _PixelInfo::red, and RedPixelChannel.
Referenced by GetColorTuple().
|
static |
Definition at line 953 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 1009 of file color.c.
References color_cache, color_semaphore, _ColorInfo::compliance, CopyMagickString(), GetMagickModule, GetNextValueInLinkedList(), InsertValueInLinkedList(), IsColorCacheInstantiated(), LocaleCompare(), LockSemaphoreInfo(), MagickFalse, MagickPathExtent, _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 1094 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 1284 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 1378 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 PixelInfo * | pixel, |
const MagickBooleanType | hex, | ||
char * | tuple | ||
) |
Definition at line 1522 of file color.c.
References _PixelInfo::alpha_trait, AlphaPixelChannel, BlackPixelChannel, BluePixelChannel, CMYKColorspace, _PixelInfo::colorspace, CommandOptionToMnemonic(), ConcatenateColorComponent(), ConcatenateMagickString(), ConcatentateHexColorComponent(), _PixelInfo::depth, GetMagickModule, GRAYColorspace, GrayPixelChannel, GreenPixelChannel, IsEventLogging(), IsSVGCompliant(), LinearGRAYColorspace, LocaleLower(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickPathExtent, RedPixelChannel, SVGCompliance, TraceEvent, and UndefinedPixelTrait.
Referenced by ConnectedComponentsImage(), GetNumberColors(), IdentifyImage(), InterpretImageProperties(), KmeansImage(), ListColorInfo(), and QueryColorname().
|
static |
Definition at line 1608 of file color.c.
References AcquireColorCache(), ActivateSemaphoreInfo(), color_cache, color_semaphore, ColorFilename, LockSemaphoreInfo(), MagickFalse, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetColorCompliance().
MagickPrivate MagickBooleanType IsEquivalentAlpha | ( | const Image * | image, |
const PixelInfo * | p, | ||
const PixelInfo * | q | ||
) |
Definition at line 1651 of file color.c.
References _PixelInfo::alpha, _Image::alpha_trait, _Image::fuzz, MagickFalse, MagickMax, MagickSQ1_2, MagickTrue, and UndefinedPixelTrait.
MagickExport MagickBooleanType IsEquivalentImage | ( | const Image * | image, |
const Image * | target_image, | ||
ssize_t * | x_offset, | ||
ssize_t * | y_offset, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1709 of file color.c.
References AcquireVirtualCacheView(), _Image::columns, DestroyCacheView(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetPixelInfo(), GetPixelInfoPixel(), IsEventLogging(), IsFuzzyEquivalencePixelInfo(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _Image::progress_monitor, _Image::rows, SearchImageText, SetImageProgress(), _Image::signature, and TraceEvent.
MagickPrivate MagickBooleanType IsEquivalentIntensity | ( | const Image * | image, |
const PixelInfo * | p, | ||
const PixelInfo * | q | ||
) |
Definition at line 1828 of file color.c.
References _Image::fuzz, GetPixelInfoIntensity(), MagickFalse, MagickMax, MagickSQ1_2, and MagickTrue.
|
inlinestatic |
Definition at line 1131 of file color.c.
References _PixelInfo::black, _PixelInfo::blue, CMYKColorspace, _PixelInfo::colorspace, _PixelInfo::green, MagickFalse, MagickTrue, _PixelInfo::red, SVGCompliant, and SVGEpsilon.
Referenced by ConcatenateColorComponent(), and GetColorTuple().
MagickExport MagickBooleanType ListColorInfo | ( | FILE * | file, |
ExceptionInfo * | exception | ||
) |
Definition at line 1875 of file color.c.
References FormatLocaleFile(), GetColorInfoList(), GetColorTuple(), LocaleCompare(), MagickFalse, MagickPathExtent, MagickTrue, _ColorInfo::path, RelinquishMagickMemory(), SVGCompliance, X11Compliance, and XPMCompliance.
|
static |
Definition at line 1966 of file color.c.
References AcquireCriticalMemory(), AcquireString(), AllCompliance, AppendValueToLinkedList(), _ColorInfo::color, _ColorInfo::compliance, ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DestroyString(), DirectorySeparator, _ColorInfo::exempt, FileToXML(), GetMagickModule, GetNextToken(), GetPathComponent(), HeadPath, IsStringTrue(), LoadColorCache(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickMaxRecursionDepth, MagickPathExtent, MagickTrue, _ColorInfo::name, _ColorInfo::path, QueryColorCompliance(), RelinquishMagickMemory(), ResourceLimitError, _ColorInfo::signature, _ColorInfo::stealth, StringLocateSubstring(), SVGCompliance, ThrowMagickException(), X11Compliance, and XPMCompliance.
Referenced by AcquireColorCache(), and LoadColorCache().
|
static |
Definition at line 2186 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 QueryColorCompliance().
MagickExport MagickBooleanType QueryColorCompliance | ( | const char * | name, |
const ComplianceType | compliance, | ||
PixelInfo * | color, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2270 of file color.c.
References AcquireString(), AllCompliance, _PixelInfo::alpha, _PixelPacket::alpha, _PixelInfo::alpha_trait, AlphaValue, BackgroundColor, _PixelInfo::black, BlendPixelTrait, _PixelInfo::blue, _PixelPacket::blue, _GeometryInfo::chi, ChiValue, ClampToQuantum(), CMYKColorspace, _ColorInfo::color, _PixelInfo::colorspace, ConvertHCLToRGB(), ConvertHSBToRGB(), ConvertHSLToRGB(), ConvertHSVToRGB(), ConvertHWBToRGB(), CopyMagickString(), _PixelInfo::depth, DestroyString(), GetColorCompliance(), GetMagickModule, GetPixelInfo(), GetQuantumRange(), GRAYColorspace, _PixelInfo::green, _PixelPacket::green, HCLColorspace, HSBColorspace, HSLColorspace, HSVColorspace, HWBColorspace, IsEventLogging(), LabColorspace, LocaleCompare(), LocaleLower(), LocaleNCompare(), LogMagickEvent(), MagickColorspaceOptions, MagickFalse, MagickPathExtent, MagickTrue, OpaqueAlpha, OptionWarning, ParseCommandOption(), ParseCSSColor(), _GeometryInfo::psi, PsiValue, QuantumRange, QueryColorCompliance(), _PixelInfo::red, _PixelPacket::red, RGBColorspace, _GeometryInfo::rho, RhoValue, ScaleAnyToQuantum(), _GeometryInfo::sigma, SigmaValue, sRGBColorspace, SubstituteString(), ThrowMagickException(), TraceEvent, UndefinedPixelTrait, _GeometryInfo::xi, and XiValue.
Referenced by AcquireImage(), CompareImages(), ConnectedComponentsImage(), DrawBoundingRectangles(), DrawClippingMask(), DrawCompositeMask(), DrawPatternPath(), FloodfillPaintImage(), GetColorRange(), GetConstantColour(), GetDrawInfo(), GetEdgeBackgroundCensus(), GetEdgeBackgroundColor(), GetHexColour(), GetImageInfo(), KmeansImage(), LoadColorCache(), MontageImageList(), PolaroidImage(), PreviewImage(), QueryColorCompliance(), RenderMVGContent(), 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 2671 of file color.c.
References _PixelInfo::alpha, _PixelInfo::alpha_trait, _PixelInfo::blue, _ColorInfo::color, color_cache, _PixelInfo::colorspace, _ColorInfo::compliance, CopyMagickString(), _PixelInfo::depth, GetColorInfo(), GetColorTuple(), GetNextValueInLinkedList(), _PixelInfo::green, IssRGBColorspace(), magick_unreferenced, MagickEpsilon, MagickFalse, MagickPathExtent, MagickTrue, _ColorInfo::name, OpaqueAlpha, _PixelInfo::red, ResetLinkedListIterator(), SVGCompliance, UndefinedPixelTrait, and XPMCompliance.
Referenced by AnnotateImage(), GetNumberColors(), IdentifyImage(), and InterpretImageProperties().
|
static |
Definition at line 790 of file color.c.
Referenced by ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), IsColorCacheInstantiated(), and QueryColorname().
|
static |
Definition at line 793 of file color.c.
Referenced by ColorComponentGenesis(), ColorComponentTerminus(), GetColorCompliance(), GetColorInfoList(), GetColorList(), and IsColorCacheInstantiated().
|
static |
Definition at line 104 of file color.c.
Referenced by AcquireColorCache().