MagickCore 6.9.12
|
#include "magick/studio.h"
#include "magick/cache-view.h"
#include "magick/color-private.h"
#include "magick/enhance.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/hashmap.h"
#include "magick/histogram.h"
#include "magick/image.h"
#include "magick/list.h"
#include "magick/memory_.h"
#include "magick/monitor-private.h"
#include "magick/pixel-private.h"
#include "magick/prepress.h"
#include "magick/quantize.h"
#include "magick/registry.h"
#include "magick/semaphore.h"
#include "magick/splay-tree.h"
#include "magick/statistic.h"
#include "magick/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 678 of file histogram.c.
References AcquireQuantumMemory(), AcquireVirtualCacheView(), _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _ColorPacket::count, DestroyCacheView(), DestroyCubeInfo(), _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetMagickPixelPacket(), GetNodeInfo(), GetPixelIndex, _ColorPacket::index, IsMagickColorMatch(), _NodeInfo::list, MagickFalse, MagickTrue, MaxTreeDepth, _NodeInfo::number_unique, _ColorPacket::pixel, PseudoClass, ResizeQuantumMemory(), ResourceLimitError, _CubeInfo::root, _Image::rows, SetMagickPixelPacket(), _Image::storage_class, and ThrowMagickException().
Referenced by IdentifyPaletteImage().
|
static |
Definition at line 207 of file histogram.c.
References AcquireQuantumMemory(), AcquireVirtualCacheView(), _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _ColorPacket::count, DestroyCacheView(), EvaluateImageTag, _NodeInfo::extent, _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetMagickPixelPacket(), GetNodeInfo(), GetPixelIndex, _ColorPacket::index, IsEventLogging(), IsMagickColorMatch(), _NodeInfo::list, LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _NodeInfo::number_unique, _ColorPacket::pixel, PseudoClass, ResizeQuantumMemory(), ResourceLimitError, _CubeInfo::root, _Image::rows, SetImageProgress(), SetMagickPixelPacket(), _Image::signature, _Image::storage_class, ThrowMagickException(), and TraceEvent.
Referenced by GetImageHistogram(), GetNumberColors(), and UniqueImageColors().
|
inlinestatic |
Definition at line 162 of file histogram.c.
References _MagickPixelPacket::blue, ClampToQuantum(), _MagickPixelPacket::green, MagickFalse, _Image::matte, _MagickPixelPacket::opacity, and _MagickPixelPacket::red.
Referenced by CheckImageColors(), ClassifyImageColors(), and IsHistogramImage().
|
static |
Definition at line 374 of file histogram.c.
References _NodeInfo::child, _ColorPacket::count, DefineImageHistogram(), _ColorPacket::index, _NodeInfo::level, _NodeInfo::list, MagickFalse, _Image::matte, MaxTreeDepth, _NodeInfo::number_unique, and _ColorPacket::pixel.
Referenced by DefineImageHistogram(), and GetImageHistogram().
Definition at line 476 of file histogram.c.
References _NodeInfo::child, DestroyColorCube(), _NodeInfo::list, MagickFalse, _Image::matte, and RelinquishMagickMemory().
Referenced by DestroyColorCube(), and DestroyCubeInfo().
Definition at line 431 of file histogram.c.
References DestroyColorCube(), _Nodes::next, _CubeInfo::node_queue, RelinquishMagickMemory(), and _CubeInfo::root.
Referenced by CheckImageColors(), GetImageHistogram(), GetNumberColors(), IsHistogramImage(), and UniqueImageColors().
|
static |
Definition at line 517 of file histogram.c.
References AcquireMagickMemory(), GetNodeInfo(), and _CubeInfo::root.
Referenced by CheckImageColors(), ClassifyImageColors(), IsHistogramImage(), QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
MagickExport ColorPacket * GetImageHistogram | ( | const Image * | image, |
size_t * | number_colors, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 565 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 623 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(), GetCubeInfo(), and IsHistogramImage().
MagickExport size_t GetNumberColors | ( | const Image * | image, |
FILE * | file, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1203 of file histogram.c.
References BlueChannel, ClassifyImageColors(), CMYKColorspace, _CubeInfo::colors, _MagickPixelPacket::colorspace, ConcatenateColorComponent(), ConcatenateMagickString(), CopyMagickString(), _ColorPacket::count, DestroyCubeInfo(), FormatLocaleFile(), GetColorTuple(), GetImageHistogram(), GetMagickPixelPacket(), GreenChannel, HistogramCompare(), HistogramImageTag, _ColorPacket::index, IndexChannel, MagickFalse, MagickTrue, _MagickPixelPacket::matte, MaxTextExtent, NoCompliance, OpacityChannel, _ColorPacket::pixel, _Image::progress_monitor, QueryMagickColorname(), RedChannel, RelinquishMagickMemory(), SetImageProgress(), SetMagickPixelPacket(), and SVGCompliance.
Referenced by GetImageQuantizeError(), GetMagickProperty(), GetMagickPropertyLetter(), and IdentifyImage().
|
static |
Definition at line 1182 of file histogram.c.
References _PixelPacket::blue, _ColorPacket::count, _PixelPacket::green, _ColorPacket::pixel, and _PixelPacket::red.
Referenced by GetNumberColors().
MagickExport MagickBooleanType IdentifyPaletteImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 811 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 847 of file histogram.c.
References AcquireQuantumMemory(), AcquireVirtualCacheView(), _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _ColorPacket::count, DestroyCacheView(), DestroyCubeInfo(), _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetMagickPixelPacket(), GetNodeInfo(), GetPixelIndex, _ColorPacket::index, IsEventLogging(), IsMagickColorMatch(), _NodeInfo::list, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, MaximumUniqueColors, MaxTreeDepth, _NodeInfo::number_unique, _ColorPacket::pixel, PseudoClass, ResizeQuantumMemory(), ResourceLimitError, _CubeInfo::root, _Image::rows, SetMagickPixelPacket(), _Image::signature, _Image::storage_class, ThrowMagickException(), and TraceEvent.
Referenced by IdentifyImage().
|
inlinestatic |
Definition at line 178 of file histogram.c.
References AbsolutePixelValue(), _MagickPixelPacket::blue, CMYKColorspace, _MagickPixelPacket::colorspace, _MagickPixelPacket::green, _MagickPixelPacket::index, MagickEpsilon, MagickFalse, MagickTrue, _MagickPixelPacket::matte, _MagickPixelPacket::opacity, OpaqueOpacity, _MagickPixelPacket::red, and TransparentOpacity.
Referenced by CheckImageColors(), ClassifyImageColors(), and IsHistogramImage().
MagickExport MagickBooleanType IsPaletteImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1013 of file histogram.c.
References _Image::colors, _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), magick_unreferenced, MagickCoreSignature, MagickFalse, MagickTrue, PseudoClass, _Image::signature, _Image::storage_class, and TraceEvent.
Referenced by CompressImageColormap(), and GetImageType().
MagickExport MagickBooleanType MinMaxStretchImage | ( | Image * | image, |
const ChannelType | channel, | ||
const double | black_value, | ||
const double | white_value | ||
) |
Definition at line 1075 of file histogram.c.
References BlueChannel, CMYKColorspace, _Image::colorspace, _Image::exception, GetImageChannelRange(), GreenChannel, IndexChannel, LevelImageChannel(), MagickEpsilon, MagickFalse, MagickTrue, _Image::matte, OpacityChannel, RedChannel, and SyncChannels.
Referenced by AutoLevelImageChannel().
|
static |
Definition at line 1322 of file histogram.c.
References _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, GetCacheViewAuthenticIndexQueue(), _ColorPacket::index, _NodeInfo::level, _NodeInfo::list, magick_restrict, MagickFalse, MagickTrue, _Image::matte, MaxTreeDepth, _NodeInfo::number_unique, _ColorPacket::pixel, _CubeInfo::progress, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), SetImageProgress(), SyncCacheViewAuthenticPixels(), UniqueColorsImageTag, UniqueColorsToImage(), and _CubeInfo::x.
Referenced by UniqueColorsToImage(), and UniqueImageColors().
MagickExport Image * UniqueImageColors | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1388 of file histogram.c.
References AcquireVirtualCacheView(), ClassifyImageColors(), CloneImage(), _CubeInfo::colors, DestroyCacheView(), DestroyCubeInfo(), DestroyImage(), DirectClass, _Image::exception, InheritException(), MagickFalse, MagickTrue, _CubeInfo::root, SetImageStorageClass(), and UniqueColorsToImage().