|
MagickCore
6.9.1
|
#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 |
Functions | |
| static CubeInfo * | GetCubeInfo (void) |
| static NodeInfo * | GetNodeInfo (CubeInfo *, const size_t) |
| static void | DestroyColorCube (const Image *, NodeInfo *) |
| static size_t | ColorToNodeId (const Image *image, const MagickPixelPacket *pixel, size_t index) |
| static CubeInfo * | ClassifyImageColors (const Image *image, ExceptionInfo *exception) |
| static void | DefineImageHistogram (const Image *image, NodeInfo *node_info, ColorPacket **histogram) |
| static CubeInfo * | DestroyCubeInfo (const Image *image, CubeInfo *cube_info) |
| MagickExport ColorPacket * | GetImageHistogram (const Image *image, size_t *number_colors, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | IsHistogramImage (const Image *image, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | IsPaletteImage (const Image *image, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | MinMaxStretchImage (Image *image, const ChannelType channel, const double black_value, const double white_value) |
| static int | HistogramCompare (const void *x, const void *y) |
| MagickExport size_t | GetNumberColors (const Image *image, FILE *file, ExceptionInfo *exception) |
| static void | UniqueColorsToImage (Image *unique_image, CacheView *unique_view, CubeInfo *cube_info, const NodeInfo *node_info, ExceptionInfo *exception) |
| MagickExport Image * | UniqueImageColors (const Image *image, ExceptionInfo *exception) |
| #define EvaluateImageTag " Compute image colors... " |
Referenced by ClassifyImageColors().
| #define HistogramImageTag "Histogram/Image" |
Referenced by GetNumberColors().
| #define MaximumUniqueColors 1024 |
Referenced by IsHistogramImage().
| #define MaxTreeDepth 8 |
Definition at line 67 of file histogram.c.
Referenced by ClassifyImageColors(), DefineImageHistogram(), IsHistogramImage(), IsPaletteImage(), and UniqueColorsToImage().
| #define NodesInAList 1536 |
Definition at line 68 of file histogram.c.
Referenced by GetNodeInfo().
| #define UniqueColorsImageTag "UniqueColors/Image" |
Referenced by UniqueColorsToImage().
|
static |
Definition at line 175 of file histogram.c.
References AcquireMagickMemory(), AcquireVirtualCacheView(), _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _ColorPacket::count, _Image::debug, DestroyCacheView(), EvaluateImageTag, _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetMagickPixelPacket(), GetNodeInfo(), GetPixelIndex, _ColorPacket::index, IsMagickColorEqual(), _NodeInfo::list, LogMagickEvent(), MagickFalse, MagickSignature, 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 159 of file histogram.c.
References _MagickPixelPacket::blue, ClampToQuantum(), _MagickPixelPacket::green, MagickFalse, _Image::matte, _MagickPixelPacket::opacity, and _MagickPixelPacket::red.
Referenced by ClassifyImageColors(), IsHistogramImage(), and IsPaletteImage().
|
static |
Definition at line 335 of file histogram.c.
References _NodeInfo::child, _ColorPacket::count, _ColorPacket::index, _NodeInfo::level, _NodeInfo::list, MagickFalse, _Image::matte, MaxTreeDepth, _NodeInfo::number_unique, and _ColorPacket::pixel.
Referenced by GetImageHistogram().
Definition at line 437 of file histogram.c.
References _NodeInfo::child, _NodeInfo::list, MagickFalse, _Image::matte, and RelinquishMagickMemory().
Referenced by DestroyCubeInfo().
Definition at line 392 of file histogram.c.
References DestroyColorCube(), _Nodes::next, _CubeInfo::node_queue, RelinquishMagickMemory(), and _CubeInfo::root.
Referenced by GetImageHistogram(), GetNumberColors(), IsHistogramImage(), IsPaletteImage(), and UniqueImageColors().
|
static |
Definition at line 478 of file histogram.c.
References AcquireMagickMemory(), GetNodeInfo(), ResetMagickMemory(), and _CubeInfo::root.
Referenced by ClassifyImageColors(), IsHistogramImage(), and IsPaletteImage().
| MagickExport ColorPacket* GetImageHistogram | ( | const Image * | image, |
| size_t * | number_colors, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 526 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 584 of file histogram.c.
References AcquireMagickMemory(), _CubeInfo::free_nodes, _NodeInfo::level, _Nodes::next, _CubeInfo::node_info, _CubeInfo::node_queue, _Nodes::nodes, NodesInAList, and ResetMagickMemory().
Referenced by ClassifyImageColors(), GetCubeInfo(), IsHistogramImage(), and IsPaletteImage().
| MagickExport size_t GetNumberColors | ( | const Image * | image, |
| FILE * | file, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1117 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, OpacityChannel, _ColorPacket::pixel, _Image::progress_monitor, QueryMagickColorname(), RedChannel, RelinquishMagickMemory(), SetImageProgress(), SetMagickPixelPacket(), SVGCompliance, and X11Compliance.
Referenced by GetImageQuantizeError(), GetMagickPropertyLetter(), and IdentifyImage().
|
static |
Definition at line 1096 of file histogram.c.
References _PixelPacket::blue, _ColorPacket::count, _PixelPacket::green, _ColorPacket::pixel, and _PixelPacket::red.
Referenced by GetNumberColors().
| MagickExport MagickBooleanType IsHistogramImage | ( | const Image * | image, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 638 of file histogram.c.
References AcquireMagickMemory(), AcquireVirtualCacheView(), _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _ColorPacket::count, _Image::debug, DestroyCacheView(), DestroyCubeInfo(), _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetMagickPixelPacket(), GetNodeInfo(), GetPixelIndex, _ColorPacket::index, IsMagickColorEqual(), _NodeInfo::list, LogMagickEvent(), MagickFalse, MagickSignature, 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().
| MagickExport MagickBooleanType IsPaletteImage | ( | const Image * | image, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 803 of file histogram.c.
References AcquireMagickMemory(), AcquireVirtualCacheView(), _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _ColorPacket::count, _Image::debug, DestroyCacheView(), DestroyCubeInfo(), _Image::filename, GetCacheViewVirtualIndexQueue(), GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetMagickPixelPacket(), GetNodeInfo(), GetPixelIndex, _ColorPacket::index, IsMagickColorEqual(), _NodeInfo::list, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, MaxTreeDepth, _NodeInfo::number_unique, _ColorPacket::pixel, PseudoClass, ResizeQuantumMemory(), ResourceLimitError, _CubeInfo::root, _Image::rows, SetMagickPixelPacket(), _Image::signature, _Image::storage_class, ThrowMagickException(), 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 989 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 1234 of file histogram.c.
References _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, GetCacheViewAuthenticIndexQueue(), _ColorPacket::index, _NodeInfo::level, _NodeInfo::list, MagickFalse, MagickTrue, _Image::matte, MaxTreeDepth, _NodeInfo::number_unique, _ColorPacket::pixel, _CubeInfo::progress, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), SetImageProgress(), SyncCacheViewAuthenticPixels(), UniqueColorsImageTag, and _CubeInfo::x.
Referenced by UniqueImageColors().
| MagickExport Image* UniqueImageColors | ( | const Image * | image, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1300 of file histogram.c.
References AcquireVirtualCacheView(), ClassifyImageColors(), CloneImage(), _CubeInfo::colors, DestroyCacheView(), DestroyCubeInfo(), DestroyImage(), DirectClass, _Image::exception, InheritException(), MagickFalse, MagickTrue, _CubeInfo::root, SetImageStorageClass(), and UniqueColorsToImage().