#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/attribute.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colormap.h"
#include "MagickCore/colorspace.h"
#include "MagickCore/colorspace-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/image-private.h"
#include "MagickCore/list.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/pixel-private.h"
#include "MagickCore/quantize.h"
#include "MagickCore/quantum.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/resource_.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
Data Structures | |
struct | _DoublePixelPacket |
struct | _NodeInfo |
struct | _Nodes |
struct | _CubeInfo |
Defines | |
#define | CacheShift 2 |
#define | ErrorQueueLength 16 |
#define | MaxNodes 266817 |
#define | MaxTreeDepth 8 |
#define | NodesInAList 1920 |
#define | AssignImageTag "Assign/Image" |
#define | ClassifyImageTag "Classify/Image" |
#define | RedShift(pixel) (((pixel) >> CacheShift) << (0*(8-CacheShift))) |
#define | GreenShift(pixel) (((pixel) >> CacheShift) << (1*(8-CacheShift))) |
#define | BlueShift(pixel) (((pixel) >> CacheShift) << (2*(8-CacheShift))) |
#define | AlphaShift(pixel) (((pixel) >> CacheShift) << (3*(8-CacheShift))) |
#define | DitherImageTag "Dither/Image" |
#define | DitherImageTag "Dither/Image" |
#define | PosterizeImageTag "Posterize/Image" |
#define | PosterizePixel(pixel) |
#define | ReduceImageTag "Reduce/Image" |
Typedefs | |
typedef struct _DoublePixelPacket | DoublePixelPacket |
typedef struct _NodeInfo | NodeInfo |
typedef struct _Nodes | Nodes |
typedef struct _CubeInfo | CubeInfo |
Functions | |
static CubeInfo * | GetCubeInfo (const QuantizeInfo *, const size_t, const size_t) |
static NodeInfo * | GetNodeInfo (CubeInfo *, const size_t, const size_t, NodeInfo *) |
static MagickBooleanType | AssignImageColors (Image *, CubeInfo *, ExceptionInfo *) |
static MagickBooleanType | ClassifyImageColors (CubeInfo *, const Image *, ExceptionInfo *) |
static MagickBooleanType | DitherImage (Image *, CubeInfo *, ExceptionInfo *) |
static MagickBooleanType | SetGrayscaleImage (Image *, ExceptionInfo *) |
static size_t | DefineImageColormap (Image *, CubeInfo *, NodeInfo *) |
static void | ClosestColor (const Image *, CubeInfo *, const NodeInfo *) |
static void | DestroyCubeInfo (CubeInfo *) |
static void | PruneLevel (CubeInfo *, const NodeInfo *) |
static void | PruneToCubeDepth (CubeInfo *, const NodeInfo *) |
static void | ReduceImageColors (const Image *, CubeInfo *) |
MagickExport QuantizeInfo * | AcquireQuantizeInfo (const ImageInfo *image_info) |
static void | AssociateAlphaPixel (const Image *image, const CubeInfo *cube_info, const Quantum *pixel, DoublePixelPacket *alpha_pixel) |
static void | AssociateAlphaPixelInfo (const CubeInfo *cube_info, const PixelInfo *pixel, DoublePixelPacket *alpha_pixel) |
static size_t | ColorToNodeId (const CubeInfo *cube_info, const DoublePixelPacket *pixel, size_t index) |
static void | SetAssociatedAlpha (const Image *image, CubeInfo *cube_info) |
MagickExport QuantizeInfo * | CloneQuantizeInfo (const QuantizeInfo *quantize_info) |
MagickExport MagickBooleanType | CompressImageColormap (Image *image, ExceptionInfo *exception) |
MagickExport QuantizeInfo * | DestroyQuantizeInfo (QuantizeInfo *quantize_info) |
static DoublePixelPacket ** | DestroyPixelThreadSet (DoublePixelPacket **pixels) |
static DoublePixelPacket ** | AcquirePixelThreadSet (const size_t count) |
static ssize_t | CacheOffset (CubeInfo *cube_info, const DoublePixelPacket *pixel) |
static MagickBooleanType | FloydSteinbergDither (Image *image, CubeInfo *cube_info, ExceptionInfo *exception) |
static MagickBooleanType | RiemersmaDither (Image *, CacheView *, CubeInfo *, const unsigned int, ExceptionInfo *) |
static void | Riemersma (Image *image, CacheView *image_view, CubeInfo *cube_info, const size_t level, const unsigned int direction, ExceptionInfo *exception) |
MagickExport MagickBooleanType | GetImageQuantizeError (Image *image, ExceptionInfo *exception) |
MagickExport void | GetQuantizeInfo (QuantizeInfo *quantize_info) |
static double | MagickRound (double x) |
MagickExport MagickBooleanType | PosterizeImage (Image *image, const size_t levels, const DitherMethod dither_method, ExceptionInfo *exception) |
static void | PruneChild (CubeInfo *cube_info, const NodeInfo *node_info) |
MagickExport MagickBooleanType | QuantizeImage (const QuantizeInfo *quantize_info, Image *image, ExceptionInfo *exception) |
MagickExport MagickBooleanType | QuantizeImages (const QuantizeInfo *quantize_info, Image *images, ExceptionInfo *exception) |
static size_t | QuantizeErrorFlatten (const CubeInfo *cube_info, const NodeInfo *node_info, const ssize_t offset, double *quantize_error) |
static void | Reduce (CubeInfo *cube_info, const NodeInfo *node_info) |
static int | QuantizeErrorCompare (const void *error_p, const void *error_q) |
MagickExport MagickBooleanType | RemapImage (const QuantizeInfo *quantize_info, Image *image, const Image *remap_image, ExceptionInfo *exception) |
MagickExport MagickBooleanType | RemapImages (const QuantizeInfo *quantize_info, Image *images, const Image *remap_image, ExceptionInfo *exception) |
static double | ConstrainPixelIntensity (double x) |
static int | IntensityCompare (const void *x, const void *y) |
#define AlphaShift | ( | pixel | ) | (((pixel) >> CacheShift) << (3*(8-CacheShift))) |
Referenced by CacheOffset().
#define AssignImageTag "Assign/Image" |
Referenced by AssignImageColors(), and QuantizeImages().
#define BlueShift | ( | pixel | ) | (((pixel) >> CacheShift) << (2*(8-CacheShift))) |
Referenced by CacheOffset().
#define CacheShift 2 |
Referenced by GetCubeInfo().
#define ClassifyImageTag "Classify/Image" |
Referenced by ClassifyImageColors().
#define DitherImageTag "Dither/Image" |
#define DitherImageTag "Dither/Image" |
Referenced by FloydSteinbergDither(), OrderedDitherImage(), and RiemersmaDither().
#define ErrorQueueLength 16 |
Referenced by DitherImage(), GetCubeInfo(), and RiemersmaDither().
#define GreenShift | ( | pixel | ) | (((pixel) >> CacheShift) << (1*(8-CacheShift))) |
Referenced by CacheOffset().
#define MaxNodes 266817 |
Referenced by ClassifyImageColors().
#define MaxTreeDepth 8 |
#define NodesInAList 1920 |
#define PosterizeImageTag "Posterize/Image" |
Referenced by PosterizeImage().
#define PosterizePixel | ( | pixel | ) |
ClampToQuantum((MagickRealType) QuantumRange*( \ MagickRound(QuantumScale*pixel*(levels-1)))/MagickMax((ssize_t) levels-1,1))
Referenced by PosterizeImage().
#define RedShift | ( | pixel | ) | (((pixel) >> CacheShift) << (0*(8-CacheShift))) |
Referenced by CacheOffset().
#define ReduceImageTag "Reduce/Image" |
Referenced by ReduceImageColors().
typedef struct _DoublePixelPacket DoublePixelPacket |
static DoublePixelPacket** AcquirePixelThreadSet | ( | const size_t | count | ) | [static] |
References AcquireQuantumMemory(), DestroyPixelThreadSet(), GetMagickResourceLimit(), and ThreadResource.
Referenced by FloydSteinbergDither().
MagickExport QuantizeInfo* AcquireQuantizeInfo | ( | const ImageInfo * | image_info | ) |
References AcquireCriticalMemory(), _ImageInfo::dither, _QuantizeInfo::dither_method, GetImageOption(), GetQuantizeInfo(), MagickDitherOptions, MagickFalse, _QuantizeInfo::measure_error, NoDitherMethod, ParseCommandOption(), RiemersmaDitherMethod, and _ImageInfo::verbose.
Referenced by PosterizeImage(), and SetImageType().
static MagickBooleanType AssignImageColors | ( | Image * | image, | |
CubeInfo * | cube_info, | |||
ExceptionInfo * | exception | |||
) | [static] |
References AcquireAuthenticCacheView(), AcquireImageColormap(), _PixelInfo::alpha, AssignImageTag, _CubeInfo::associate_alpha, AssociateAlphaPixel(), _PixelInfo::blue, _NodeInfo::child, ClampToQuantum(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, _Image::colors, _CubeInfo::colors, _QuantizeInfo::colorspace, _Image::colorspace, ColorToNodeId(), _Image::columns, DefineImageColormap(), DestroyCacheView(), _CubeInfo::distance, _QuantizeInfo::dither_method, DitherImage(), _Image::filename, GetCacheViewAuthenticPixels(), GetImageQuantizeError(), GetPixelChannels(), GetPixelInfoLuma(), GetPixelInfoPixel(), GRAYColorspace, _PixelInfo::green, IsPixelEquivalent(), IssRGBCompatibleColorspace(), LinearGRAYColorspace, magick_restrict, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, NoDitherMethod, _QuantizeInfo::number_colors, _NodeInfo::parent, _Image::progress_monitor, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelInfo::red, ResourceLimitError, _CubeInfo::root, _Image::rows, SetImageProgress(), SetPixelAlpha(), SetPixelBlue(), SetPixelGreen(), SetPixelIndex(), SetPixelRed(), _Image::storage_class, SyncCacheViewAuthenticPixels(), SyncImage(), _CubeInfo::target, ThrowBinaryException, TransformImageColorspace(), _CubeInfo::transparent_index, _CubeInfo::transparent_pixels, and UndefinedColorspace.
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
static void AssociateAlphaPixel | ( | const Image * | image, | |
const CubeInfo * | cube_info, | |||
const Quantum * | pixel, | |||
DoublePixelPacket * | alpha_pixel | |||
) | [inline, static] |
References _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, GetPixelAlpha(), GetPixelBlue(), GetPixelGreen(), GetPixelRed(), _DoublePixelPacket::green, MagickFalse, OpaqueAlpha, QuantumScale, and _DoublePixelPacket::red.
Referenced by AssignImageColors(), ClassifyImageColors(), FloydSteinbergDither(), and RiemersmaDither().
static void AssociateAlphaPixelInfo | ( | const CubeInfo * | cube_info, | |
const PixelInfo * | pixel, | |||
DoublePixelPacket * | alpha_pixel | |||
) | [inline, static] |
References _DoublePixelPacket::alpha, _PixelInfo::alpha, _CubeInfo::associate_alpha, _PixelInfo::blue, _DoublePixelPacket::blue, _PixelInfo::green, _DoublePixelPacket::green, MagickFalse, OpaqueAlpha, QuantumScale, _PixelInfo::red, and _DoublePixelPacket::red.
Referenced by FloydSteinbergDither(), and RiemersmaDither().
static ssize_t CacheOffset | ( | CubeInfo * | cube_info, | |
const DoublePixelPacket * | pixel | |||
) | [inline, static] |
References _DoublePixelPacket::alpha, AlphaShift, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, BlueShift, ClampPixel(), _DoublePixelPacket::green, GreenShift, MagickFalse, _DoublePixelPacket::red, RedShift, and ScaleQuantumToChar().
Referenced by FloydSteinbergDither(), and RiemersmaDither().
static MagickBooleanType ClassifyImageColors | ( | CubeInfo * | cube_info, | |
const Image * | image, | |||
ExceptionInfo * | exception | |||
) |
References AcquireVirtualCacheView(), _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, AssociateAlphaPixel(), _DoublePixelPacket::blue, _NodeInfo::child, ClampPixel(), ClassifyImageTag, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, _QuantizeInfo::colorspace, ColorToNodeId(), _Image::columns, _CubeInfo::depth, DestroyCacheView(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetNodeInfo(), GetPixelChannels(), GetPixelInfoPixel(), _DoublePixelPacket::green, IsNaN, IsPixelEquivalent(), IssRGBCompatibleColorspace(), magick_restrict, MagickFalse, MagickTrue, _CubeInfo::maximum_colors, MaxNodes, MaxTreeDepth, _CubeInfo::nodes, _NodeInfo::number_unique, OpaqueAlpha, PruneLevel(), PruneToCubeDepth(), _NodeInfo::quantize_error, _CubeInfo::quantize_info, QuantumRange, QuantumScale, _DoublePixelPacket::red, ResourceLimitError, _CubeInfo::root, _Image::rows, SetAssociatedAlpha(), SetImageProgress(), sRGBColorspace, ThrowMagickException(), _NodeInfo::total_color, TransformImageColorspace(), and UndefinedColorspace.
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
MagickExport QuantizeInfo* CloneQuantizeInfo | ( | const QuantizeInfo * | quantize_info | ) |
static void ClosestColor | ( | const Image * | image, | |
CubeInfo * | cube_info, | |||
const NodeInfo * | node_info | |||
) | [static] |
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::color_number, _NodeInfo::color_number, _Image::colormap, _CubeInfo::distance, magick_restrict, MagickFalse, _NodeInfo::number_unique, QuantumScale, and _CubeInfo::target.
Referenced by AssignImageColors(), FloydSteinbergDither(), and RiemersmaDither().
static size_t ColorToNodeId | ( | const CubeInfo * | cube_info, | |
const DoublePixelPacket * | pixel, | |||
size_t | index | |||
) | [inline, static] |
References _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, ClampPixel(), _DoublePixelPacket::green, MagickFalse, _DoublePixelPacket::red, and ScaleQuantumToChar().
Referenced by AssignImageColors(), ClassifyImageColors(), FloydSteinbergDither(), and RiemersmaDither().
MagickExport MagickBooleanType CompressImageColormap | ( | Image * | image, | |
ExceptionInfo * | exception | |||
) |
static double ConstrainPixelIntensity | ( | double | x | ) | [inline, static] |
Referenced by IntensityCompare().
static size_t DefineImageColormap | ( | Image * | image, | |
CubeInfo * | cube_info, | |||
NodeInfo * | node_info | |||
) | [static] |
References _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, _NodeInfo::child, ClampToQuantum(), _NodeInfo::color_number, _Image::colormap, _Image::colors, _DoublePixelPacket::green, magick_restrict, MagickFalse, _NodeInfo::number_unique, OpaqueAlpha, PerceptibleReciprocal(), QuantumRange, QuantumScale, _DoublePixelPacket::red, _NodeInfo::total_color, _CubeInfo::transparent_index, and _CubeInfo::transparent_pixels.
Referenced by AssignImageColors().
static void DestroyCubeInfo | ( | CubeInfo * | cube_info | ) |
References DestroyQuantizeInfo(), _CubeInfo::memory_info, _Nodes::next, _CubeInfo::node_queue, _Nodes::nodes, _CubeInfo::quantize_info, RelinquishMagickMemory(), and RelinquishVirtualMemory().
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
static DoublePixelPacket** DestroyPixelThreadSet | ( | DoublePixelPacket ** | pixels | ) | [static] |
References GetMagickResourceLimit(), RelinquishMagickMemory(), and ThreadResource.
Referenced by AcquirePixelThreadSet(), and FloydSteinbergDither().
MagickExport QuantizeInfo* DestroyQuantizeInfo | ( | QuantizeInfo * | quantize_info | ) |
References GetMagickModule, LogMagickEvent(), MagickCoreSignature, RelinquishMagickMemory(), _QuantizeInfo::signature, and TraceEvent.
Referenced by DestroyCubeInfo(), PosterizeImage(), SetImageType(), and XDestroyResourceInfo().
static MagickBooleanType DitherImage | ( | Image * | image, | |
CubeInfo * | cube_info, | |||
ExceptionInfo * | exception | |||
) |
References AcquireAuthenticCacheView(), _Image::columns, DestroyCacheView(), _QuantizeInfo::dither_method, _CubeInfo::error, ErrorQueueLength, FloydSteinbergDither(), ForgetGravity, MagickMax, NorthGravity, _CubeInfo::offset, _CubeInfo::quantize_info, Riemersma(), RiemersmaDither(), RiemersmaDitherMethod, _Image::rows, _CubeInfo::span, _CubeInfo::x, and _CubeInfo::y.
Referenced by AssignImageColors().
static MagickBooleanType FloydSteinbergDither | ( | Image * | image, | |
CubeInfo * | cube_info, | |||
ExceptionInfo * | exception | |||
) | [static] |
References AcquireAuthenticCacheView(), AcquirePixelThreadSet(), _PixelInfo::alpha, _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, AssociateAlphaPixel(), AssociateAlphaPixelInfo(), _PixelInfo::blue, _DoublePixelPacket::blue, _CubeInfo::cache, CacheOffset(), _NodeInfo::child, ClampPixel(), ClampToQuantum(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, ColorToNodeId(), _Image::columns, DestroyCacheView(), DestroyPixelThreadSet(), _CubeInfo::distance, DitherImageTag, GetCacheViewAuthenticPixels(), GetImageArtifact(), GetOpenMPThreadId(), GetPixelChannels(), _PixelInfo::green, _DoublePixelPacket::green, magick_restrict, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, _NodeInfo::parent, _Image::progress_monitor, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelInfo::red, _DoublePixelPacket::red, _CubeInfo::root, _Image::rows, SetImageProgress(), SetPixelAlpha(), SetPixelBlue(), SetPixelGreen(), SetPixelIndex(), SetPixelRed(), _Image::storage_class, StringToDoubleInterval(), SyncCacheViewAuthenticPixels(), and _CubeInfo::target.
Referenced by DitherImage().
static CubeInfo * GetCubeInfo | ( | const QuantizeInfo * | quantize_info, | |
const size_t | depth, | |||
const size_t | maximum_colors | |||
) | [static] |
References AcquireMagickMemory(), AcquireVirtualMemory(), _CubeInfo::cache, CacheShift, CloneQuantizeInfo(), _CubeInfo::depth, _QuantizeInfo::dither_method, ErrorQueueLength, GetNodeInfo(), GetVirtualMemoryBlob(), _CubeInfo::maximum_colors, MaxTreeDepth, _CubeInfo::memory_info, NoDitherMethod, _NodeInfo::parent, PerceptibleReciprocal(), _CubeInfo::quantize_info, QuantumRange, _CubeInfo::root, and _CubeInfo::weights.
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
MagickExport MagickBooleanType GetImageQuantizeError | ( | Image * | image, | |
ExceptionInfo * | exception | |||
) |
References AcquireVirtualCacheView(), _PixelInfo::alpha, _Image::alpha_trait, BlendPixelTrait, _PixelInfo::blue, _Image::colormap, _Image::columns, _Image::debug, DestroyCacheView(), DirectClass, _Image::error, _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetNumberColors(), GetPixelAlpha(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelIndex(), GetPixelRed(), _PixelInfo::green, LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, QuantumScale, _PixelInfo::red, _Image::rows, _Image::signature, _Image::storage_class, _Image::total_colors, and TraceEvent.
Referenced by AssignImageColors().
static NodeInfo * GetNodeInfo | ( | CubeInfo * | cube_info, | |
const size_t | id, | |||
const size_t | level, | |||
NodeInfo * | parent | |||
) | [static] |
References AcquireMagickMemory(), AcquireQuantumMemory(), _CubeInfo::free_nodes, _NodeInfo::id, _NodeInfo::level, _Nodes::next, _CubeInfo::next_node, _CubeInfo::node_queue, _CubeInfo::nodes, _Nodes::nodes, NodesInAList, and _NodeInfo::parent.
Referenced by ClassifyImageColors(), and GetCubeInfo().
MagickExport void GetQuantizeInfo | ( | QuantizeInfo * | quantize_info | ) |
References _QuantizeInfo::colorspace, _QuantizeInfo::dither_method, GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, _QuantizeInfo::measure_error, _QuantizeInfo::number_colors, RiemersmaDitherMethod, _QuantizeInfo::signature, TraceEvent, and UndefinedColorspace.
Referenced by AcquireQuantizeInfo(), CloneQuantizeInfo(), CompressImageColormap(), and PreviewImage().
static int IntensityCompare | ( | const void * | x, | |
const void * | y | |||
) | [static] |
References ConstrainPixelIntensity(), and GetPixelInfoIntensity().
Referenced by SetGrayscaleImage().
static double MagickRound | ( | double | x | ) | [inline, static] |
MagickExport MagickBooleanType PosterizeImage | ( | Image * | image, | |
const size_t | levels, | |||
const DitherMethod | dither_method, | |||
ExceptionInfo * | exception | |||
) |
References AcquireAuthenticCacheView(), AcquireQuantizeInfo(), _PixelInfo::alpha, _Image::alpha_trait, BlendPixelTrait, _PixelInfo::blue, CMYKColorspace, _Image::colormap, _Image::colors, _Image::colorspace, _Image::columns, _Image::debug, DestroyCacheView(), DestroyQuantizeInfo(), _QuantizeInfo::dither_method, _Image::filename, GetCacheViewAuthenticPixels(), GetMagickModule, GetPixelAlpha(), GetPixelAlphaTraits(), GetPixelBlack(), GetPixelBlackTraits(), GetPixelBlue(), GetPixelBlueTraits(), GetPixelChannels(), GetPixelGreen(), GetPixelGreenTraits(), GetPixelRed(), GetPixelRedTraits(), _PixelInfo::green, LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickMin, MagickTrue, MaxColormapSize, MaxTreeDepth, _QuantizeInfo::number_colors, PosterizeImageTag, PosterizePixel, _Image::progress_monitor, PseudoClass, QuantizeImage(), _PixelInfo::red, _Image::rows, SetImageProgress(), SetPixelAlpha(), SetPixelBlack(), SetPixelBlue(), SetPixelGreen(), SetPixelRed(), _ExceptionInfo::signature, _Image::signature, _Image::storage_class, SyncCacheViewAuthenticPixels(), TraceEvent, _QuantizeInfo::tree_depth, and UpdatePixelTrait.
References _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, _NodeInfo::child, _DoublePixelPacket::green, _NodeInfo::id, MagickFalse, _CubeInfo::nodes, _NodeInfo::number_unique, _NodeInfo::parent, _DoublePixelPacket::red, and _NodeInfo::total_color.
Referenced by PruneLevel(), PruneToCubeDepth(), and Reduce().
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::depth, _NodeInfo::level, MagickFalse, and PruneChild().
Referenced by ClassifyImageColors().
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::depth, _NodeInfo::level, MagickFalse, and PruneChild().
Referenced by ClassifyImageColors().
static int QuantizeErrorCompare | ( | const void * | error_p, | |
const void * | error_q | |||
) | [static] |
References MagickEpsilon.
Referenced by ReduceImageColors().
static size_t QuantizeErrorFlatten | ( | const CubeInfo * | cube_info, | |
const NodeInfo * | node_info, | |||
const ssize_t | offset, | |||
double * | quantize_error | |||
) | [static] |
References _CubeInfo::associate_alpha, _NodeInfo::child, MagickFalse, _CubeInfo::nodes, and _NodeInfo::quantize_error.
Referenced by ReduceImageColors().
MagickExport MagickBooleanType QuantizeImage | ( | const QuantizeInfo * | quantize_info, | |
Image * | image, | |||
ExceptionInfo * | exception | |||
) |
References _Image::alpha_trait, AssignImageColors(), BlendPixelTrait, ClassifyImageColors(), CMYKColorspace, _CubeInfo::colors, _Image::colors, _QuantizeInfo::colorspace, _Image::debug, DestroyCubeInfo(), _QuantizeInfo::dither_method, _Image::filename, GetCubeInfo(), GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, MaxColormapSize, _CubeInfo::maximum_colors, MaxTreeDepth, NoDitherMethod, _QuantizeInfo::number_colors, PseudoClass, ReduceImageColors(), ResourceLimitError, SetGrayscaleImage(), SetImageGray(), _ExceptionInfo::signature, _Image::signature, _QuantizeInfo::signature, _Image::storage_class, ThrowBinaryException, TraceEvent, TransformImageColorspace(), _QuantizeInfo::tree_depth, and UndefinedColorspace.
Referenced by CompressImageColormap(), PosterizeImage(), PreviewImage(), QuantizeImages(), SetImageType(), and XMakeStandardColormap().
MagickExport MagickBooleanType QuantizeImages | ( | const QuantizeInfo * | quantize_info, | |
Image * | images, | |||
ExceptionInfo * | exception | |||
) |
References AssignImageColors(), AssignImageTag, ClassifyImageColors(), _Image::client_data, _Image::debug, DestroyCubeInfo(), _QuantizeInfo::dither_method, _Image::filename, GetCubeInfo(), GetImageListLength(), GetMagickModule, GetNextImageInList(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxColormapSize, NoDitherMethod, _QuantizeInfo::number_colors, QuantizeImage(), ReduceImageColors(), ResourceLimitError, SetImageProgress(), SetImageProgressMonitor(), _ExceptionInfo::signature, _Image::signature, _QuantizeInfo::signature, ThrowMagickException(), TraceEvent, and _QuantizeInfo::tree_depth.
Referenced by RemapImages().
References AcquireQuantumMemory(), _CubeInfo::colors, MagickFalse, _CubeInfo::maximum_colors, _CubeInfo::next_threshold, _CubeInfo::nodes, _CubeInfo::pruning_threshold, _NodeInfo::quantize_error, QuantizeErrorCompare(), QuantizeErrorFlatten(), Reduce(), ReduceImageTag, RelinquishMagickMemory(), _CubeInfo::root, and SetImageProgress().
Referenced by QuantizeImage(), and QuantizeImages().
MagickExport MagickBooleanType RemapImage | ( | const QuantizeInfo * | quantize_info, | |
Image * | image, | |||
const Image * | remap_image, | |||
ExceptionInfo * | exception | |||
) |
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, _Image::debug, DestroyCubeInfo(), _Image::filename, GetCubeInfo(), GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, ResourceLimitError, _ExceptionInfo::signature, _Image::signature, ThrowBinaryException, and TraceEvent.
Referenced by XMakeStandardColormap().
MagickExport MagickBooleanType RemapImages | ( | const QuantizeInfo * | quantize_info, | |
Image * | images, | |||
const Image * | remap_image, | |||
ExceptionInfo * | exception | |||
) |
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, _Image::debug, DestroyCubeInfo(), _Image::filename, GetCubeInfo(), GetMagickModule, GetNextImageInList(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, QuantizeImages(), ResourceLimitError, _ExceptionInfo::signature, _Image::signature, ThrowBinaryException, and TraceEvent.
static void Riemersma | ( | Image * | image, | |
CacheView * | image_view, | |||
CubeInfo * | cube_info, | |||
const size_t | level, | |||
const unsigned int | direction, | |||
ExceptionInfo * | exception | |||
) | [static] |
References EastGravity, NorthGravity, RiemersmaDither(), SouthGravity, and WestGravity.
Referenced by DitherImage().
static MagickBooleanType RiemersmaDither | ( | Image * | image, | |
CacheView * | image_view, | |||
CubeInfo * | cube_info, | |||
const unsigned int | direction, | |||
ExceptionInfo * | exception | |||
) | [static] |
References _PixelInfo::alpha, _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, AssociateAlphaPixel(), AssociateAlphaPixelInfo(), _PixelInfo::blue, _DoublePixelPacket::blue, _CubeInfo::cache, CacheOffset(), _NodeInfo::child, ClampPixel(), ClampToQuantum(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, ColorToNodeId(), _Image::columns, _CubeInfo::distance, DitherImageTag, EastGravity, _CubeInfo::error, ErrorQueueLength, GetCacheViewAuthenticPixels(), _PixelInfo::green, _DoublePixelPacket::green, magick_restrict, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, NorthGravity, _CubeInfo::offset, _NodeInfo::parent, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelInfo::red, _DoublePixelPacket::red, _CubeInfo::root, _Image::rows, SetImageProgress(), SetPixelAlpha(), SetPixelBlue(), SetPixelGreen(), SetPixelIndex(), SetPixelRed(), SouthGravity, _CubeInfo::span, _Image::storage_class, SyncCacheViewAuthenticPixels(), _CubeInfo::target, _CubeInfo::weights, WestGravity, _CubeInfo::x, and _CubeInfo::y.
Referenced by DitherImage(), and Riemersma().
static MagickBooleanType SetGrayscaleImage | ( | Image * | image, | |
ExceptionInfo * | exception | |||
) |
References AcquireAuthenticCacheView(), AcquireImageColormap(), AcquireQuantumMemory(), _PixelInfo::alpha, BilevelType, _PixelInfo::blue, _Image::colormap, _Image::colors, _Image::columns, DestroyCacheView(), _Image::filename, GetCacheViewAuthenticPixels(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelIndex(), GetPixelRed(), GRAYColorspace, GrayscaleType, _PixelInfo::green, IntensityCompare(), IsPixelInfoEquivalent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickMax, MagickTrue, MaxColormapSize, MaxMap, PseudoClass, _PixelInfo::red, RelinquishMagickMemory(), ResourceLimitError, _Image::rows, ScaleQuantumToMap(), SetImageMonochrome(), SetPixelIndex(), _Image::signature, _Image::storage_class, SyncCacheViewAuthenticPixels(), ThrowBinaryException, TransformImageColorspace(), and _Image::type.
Referenced by QuantizeImage().