MagickCore
7.0.10
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"
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 PixelInfo *pixel, size_t index) |
static CubeInfo * | ClassifyImageColors (const Image *image, ExceptionInfo *exception) |
static void | DefineImageHistogram (const Image *image, NodeInfo *node_info, PixelInfo **histogram) |
static CubeInfo * | DestroyCubeInfo (const Image *image, CubeInfo *cube_info) |
MagickExport PixelInfo * | GetImageHistogram (const Image *image, size_t *number_colors, ExceptionInfo *exception) |
static MagickBooleanType | CheckImageColors (const Image *image, ExceptionInfo *exception, size_t max_colors) |
MagickExport MagickBooleanType | IdentifyPaletteImage (const Image *image, ExceptionInfo *exception) |
MagickExport MagickBooleanType | IsHistogramImage (const Image *image, ExceptionInfo *exception) |
MagickExport MagickBooleanType | IsPaletteImage (const Image *image) |
MagickExport MagickBooleanType | MinMaxStretchImage (Image *image, const double black, const double white, const double gamma, ExceptionInfo *exception) |
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 |
Referenced by CheckImageColors(), ClassifyImageColors(), DefineImageHistogram(), and UniqueColorsToImage().
#define NodesInAList 1536 |
Referenced by GetNodeInfo().
#define UniqueColorsImageTag "UniqueColors/Image" |
Referenced by UniqueColorsToImage().
|
static |
References AcquireMagickMemory(), 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, IsPixelInfoEquivalent(), _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 |
References AcquireQuantumMemory(), AcquireVirtualCacheView(), _PixelInfo::alpha, _PixelInfo::black, _PixelInfo::blue, _NodeInfo::child, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, ColorToNodeId(), _Image::columns, _PixelInfo::count, _Image::debug, EvaluateImageTag, _NodeInfo::extent, _Image::filename, GetCacheViewVirtualPixels(), GetCubeInfo(), GetMagickModule, GetNodeInfo(), GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelInfo(), GetPixelInfoPixel(), GetPixelRed(), _PixelInfo::green, IsPixelInfoEquivalent(), _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 |
References _PixelInfo::alpha, _Image::alpha_trait, _PixelInfo::blue, ClampToQuantum(), _PixelInfo::green, _PixelInfo::red, and UndefinedPixelTrait.
Referenced by CheckImageColors(), and ClassifyImageColors().
|
static |
References _Image::alpha_trait, _NodeInfo::child, _NodeInfo::level, _NodeInfo::list, MaxTreeDepth, _NodeInfo::number_unique, and UndefinedPixelTrait.
Referenced by GetImageHistogram().
References _Image::alpha_trait, _NodeInfo::child, _NodeInfo::list, RelinquishMagickMemory(), and UndefinedPixelTrait.
Referenced by DestroyCubeInfo().
References DestroyColorCube(), _Nodes::next, _CubeInfo::node_queue, RelinquishMagickMemory(), and _CubeInfo::root.
Referenced by GetImageHistogram(), GetNumberColors(), and UniqueImageColors().
|
static |
References AcquireMagickMemory(), GetNodeInfo(), and _CubeInfo::root.
Referenced by CheckImageColors(), and ClassifyImageColors().
MagickExport PixelInfo* GetImageHistogram | ( | const Image * | image, |
size_t * | number_colors, | ||
ExceptionInfo * | exception | ||
) |
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 | ||
) |
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 |
References _PixelInfo::blue, _PixelInfo::count, _PixelInfo::green, and _PixelInfo::red.
Referenced by GetNumberColors().
MagickExport MagickBooleanType IdentifyPaletteImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
References CheckImageColors(), _Image::debug, _Image::filename, GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::signature, and TraceEvent.
Referenced by IdentifyImageType().
MagickExport MagickBooleanType IsHistogramImage | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
References CheckImageColors(), _Image::debug, _Image::filename, GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, MaximumUniqueColors, _Image::signature, and TraceEvent.
Referenced by IdentifyImage().
MagickExport MagickBooleanType IsPaletteImage | ( | const Image * | image | ) |
References _Image::colors, _Image::debug, _Image::filename, GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, PseudoClass, _Image::signature, _Image::storage_class, and TraceEvent.
Referenced by CompressImageColormap(), and GetImageType().
MagickExport MagickBooleanType MinMaxStretchImage | ( | Image * | image, |
const double | black, | ||
const double | white, | ||
const double | gamma, | ||
ExceptionInfo * | exception | ||
) |
References _Image::channel_mask, DefaultChannels, GetImageRange(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), LevelImage(), MagickEpsilon, MagickFalse, MagickTrue, SetImageChannelMask(), and UpdatePixelTrait.
Referenced by AutoLevelImage().
|
static |
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, and _CubeInfo::x.
Referenced by UniqueImageColors().
MagickExport Image* UniqueImageColors | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |