MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/color-private.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/histogram.h"
#include "MagickCore/image.h"
#include "MagickCore/linked-list.h"
#include "MagickCore/list.h"
#include "MagickCore/memory_.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/prepress.h"
#include "MagickCore/quantize.h"
#include "MagickCore/registry.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/splay-tree.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
Go to the source code of this file.
Data Structures | |
struct | _NodeInfo |
struct | _Nodes |
struct | _CubeInfo |
Macros | |
#define | MaxTreeDepth 8 |
#define | NodesInAList 1536 |
#define | EvaluateImageTag " Compute image colors... " |
#define | MaximumUniqueColors 1024 |
#define | HistogramImageTag "Histogram/Image" |
#define | UniqueColorsImageTag "UniqueColors/Image" |
Typedefs | |
typedef struct _NodeInfo | NodeInfo |
typedef struct _Nodes | Nodes |
typedef struct _CubeInfo | CubeInfo |
#define EvaluateImageTag " Compute image colors... " |
#define HistogramImageTag "Histogram/Image" |
#define MaximumUniqueColors 1024 |
#define MaxTreeDepth 8 |
Definition at line 67 of file histogram.c.
#define NodesInAList 1536 |
Definition at line 68 of file histogram.c.
#define UniqueColorsImageTag "UniqueColors/Image" |
|
static |
Definition at line 669 of file histogram.c.
References AcquireQuantumMemory(), AcquireVirtualCacheView(), _PixelInfo::alpha, _PixelInfo::black, _PixelInfo::blue, _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _PixelInfo::count, _Image::filename, GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetNodeInfo(), GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelInfo(), GetPixelInfoPixel(), GetPixelRed(), _PixelInfo::green, IsPixelInfoColorMatch(), _NodeInfo::list, MagickFalse, MagickTrue, MaxTreeDepth, _NodeInfo::number_unique, PseudoClass, _PixelInfo::red, ResizeQuantumMemory(), ResourceLimitError, _CubeInfo::root, _Image::rows, _Image::storage_class, and ThrowMagickException().
Referenced by IdentifyPaletteImage(), and IsHistogramImage().
|
static |
Definition at line 205 of file histogram.c.
References AcquireQuantumMemory(), AcquireVirtualCacheView(), _PixelInfo::alpha, _PixelInfo::black, _PixelInfo::blue, _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _PixelInfo::count, EvaluateImageTag, _NodeInfo::extent, _Image::filename, GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetNodeInfo(), GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelInfo(), GetPixelInfoPixel(), GetPixelRed(), _PixelInfo::green, IsEventLogging(), IsPixelInfoColorMatch(), _NodeInfo::list, LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _NodeInfo::number_unique, _PixelInfo::red, ResizeQuantumMemory(), ResourceLimitError, _CubeInfo::root, _Image::rows, SetImageProgress(), _Image::signature, ThrowMagickException(), and TraceEvent.
Referenced by GetImageHistogram(), GetNumberColors(), and UniqueImageColors().
|
inlinestatic |
Definition at line 162 of file histogram.c.
References _PixelInfo::alpha, _PixelInfo::alpha_trait, _PixelInfo::blue, ClampToQuantum(), _PixelInfo::green, _PixelInfo::red, and UndefinedPixelTrait.
Referenced by CheckImageColors(), and ClassifyImageColors().
|
static |
Definition at line 365 of file histogram.c.
References _Image::alpha_trait, _NodeInfo::child, DefineImageHistogram(), _NodeInfo::level, _NodeInfo::list, MaxTreeDepth, _NodeInfo::number_unique, and UndefinedPixelTrait.
Referenced by DefineImageHistogram(), and GetImageHistogram().
Definition at line 465 of file histogram.c.
References _Image::alpha_trait, _NodeInfo::child, DestroyColorCube(), _NodeInfo::list, RelinquishMagickMemory(), and UndefinedPixelTrait.
Referenced by DestroyColorCube(), and DestroyCubeInfo().
Definition at line 420 of file histogram.c.
References DestroyColorCube(), _Nodes::next, _CubeInfo::node_queue, RelinquishMagickMemory(), and _CubeInfo::root.
Referenced by GetImageHistogram(), GetNumberColors(), and UniqueImageColors().
|
static |
Definition at line 506 of file histogram.c.
References AcquireMagickMemory(), GetNodeInfo(), and _CubeInfo::root.
Referenced by CheckImageColors(), ClassifyImageColors(), KmeansImage(), QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
MagickExport PixelInfo * GetImageHistogram | ( | const Image * | image, |
size_t * | number_colors, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 554 of file histogram.c.
References AcquireQuantumMemory(), ClassifyImageColors(), _CubeInfo::colors, DefineImageHistogram(), DestroyCubeInfo(), _Image::filename, GetMagickModule, ResourceLimitError, _CubeInfo::root, and ThrowMagickException().
Referenced by GetNumberColors().
Definition at line 612 of file histogram.c.
References AcquireMagickMemory(), _CubeInfo::free_nodes, _NodeInfo::level, _Nodes::next, _CubeInfo::node_info, _CubeInfo::node_queue, _Nodes::nodes, and NodesInAList.
Referenced by CheckImageColors(), ClassifyImageColors(), and GetCubeInfo().
MagickExport size_t GetNumberColors | ( | const Image * | image, |
FILE * | file, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1029 of file histogram.c.
References _PixelInfo::alpha_trait, AlphaPixelChannel, BlackPixelChannel, BluePixelChannel, ClassifyImageColors(), CMYKColorspace, _CubeInfo::colors, _PixelInfo::colorspace, ConcatenateColorComponent(), ConcatenateMagickString(), CopyMagickString(), _PixelInfo::count, DestroyCubeInfo(), FormatLocaleFile(), GetColorTuple(), GetImageHistogram(), GetPixelInfo(), GreenPixelChannel, HistogramCompare(), HistogramImageTag, MagickFalse, MagickPathExtent, MagickTrue, NoCompliance, _Image::progress_monitor, QueryColorname(), RedPixelChannel, RelinquishMagickMemory(), SetImageProgress(), SVGCompliance, and UndefinedPixelTrait.
Referenced by GetImageQuantizeError(), GetMagickProperty(), GetMagickPropertyLetter(), and IdentifyImage().
|
static |
Definition at line 1008 of file histogram.c.
References _PixelInfo::blue, _PixelInfo::count, _PixelInfo::green, and _PixelInfo::red.
Referenced by GetNumberColors().
MagickExport MagickBooleanType IdentifyPaletteImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 796 of file histogram.c.
References CheckImageColors(), _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::signature, and TraceEvent.
Referenced by IdentifyImageType().
MagickExport MagickBooleanType IsHistogramImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 832 of file histogram.c.
References CheckImageColors(), _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaximumUniqueColors, _Image::signature, and TraceEvent.
Referenced by IdentifyImage().
MagickExport MagickBooleanType IsPaletteImage | ( | const Image * | image | ) |
Definition at line 867 of file histogram.c.
References _Image::colors, _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, PseudoClass, _Image::signature, _Image::storage_class, and TraceEvent.
Referenced by CompressImageColormap(), and GetImageType().
|
inlinestatic |
Definition at line 177 of file histogram.c.
References AbsolutePixelValue(), CMYKColorspace, MagickEpsilon, MagickFalse, MagickTrue, OpaqueAlpha, and UndefinedPixelTrait.
Referenced by CheckImageColors(), and ClassifyImageColors().
MagickExport MagickBooleanType MinMaxStretchImage | ( | Image * | image, |
const double | black, | ||
const double | white, | ||
const double | gamma, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 926 of file histogram.c.
References _Image::channel_mask, DefaultChannels, GetImageRange(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), LevelImage(), MagickEpsilon, MagickFalse, MagickTrue, SetImageChannelMask(), and UpdatePixelTrait.
Referenced by AutoLevelImage().
|
static |
Definition at line 1150 of file histogram.c.
References _PixelInfo::alpha, _Image::alpha_trait, _PixelInfo::black, _PixelInfo::blue, _NodeInfo::child, ClampToQuantum(), CMYKColorspace, _CubeInfo::colors, _Image::colorspace, _PixelInfo::green, _NodeInfo::level, _NodeInfo::list, magick_restrict, MagickFalse, MagickTrue, MaxTreeDepth, _NodeInfo::number_unique, _CubeInfo::progress, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), _PixelInfo::red, SetImageProgress(), SetPixelAlpha(), SetPixelBlack(), SetPixelBlue(), SetPixelGreen(), SetPixelRed(), SyncCacheViewAuthenticPixels(), UndefinedPixelTrait, UniqueColorsImageTag, UniqueColorsToImage(), and _CubeInfo::x.
Referenced by UniqueColorsToImage(), and UniqueImageColors().
MagickExport Image * UniqueImageColors | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1215 of file histogram.c.
References AcquireAuthenticCacheView(), ClassifyImageColors(), CloneImage(), _CubeInfo::colors, DestroyCacheView(), DestroyCubeInfo(), DestroyImage(), DirectClass, MagickFalse, MagickTrue, _CubeInfo::root, SetImageStorageClass(), and UniqueColorsToImage().