#include "magick/studio.h"#include "magick/cache-view.h"#include "magick/color.h"#include "magick/color-private.h"#include "magick/colorspace.h"#include "magick/enhance.h"#include "magick/exception.h"#include "magick/exception-private.h"#include "magick/histogram.h"#include "magick/image.h"#include "magick/image-private.h"#include "magick/list.h"#include "magick/memory_.h"#include "magick/monitor.h"#include "magick/monitor-private.h"#include "magick/option.h"#include "magick/pixel-private.h"#include "magick/quantize.h"#include "magick/quantum.h"#include "magick/string_.h"
Go to the source code of this file.
Data Structures | |
| struct | _RealPixelPacket |
| 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 | DitherImageTag "Dither/Image" |
| #define | DitherImageTag "Dither/Image" |
| #define | ReduceImageTag "Reduce/Image" |
Typedefs | |
| typedef struct _RealPixelPacket | RealPixelPacket |
| typedef struct _NodeInfo | NodeInfo |
| typedef struct _Nodes | Nodes |
| typedef struct _CubeInfo | CubeInfo |
Functions | |
| static CubeInfo * | GetCubeInfo (const QuantizeInfo *, const unsigned long, const unsigned long) |
| static NodeInfo * | GetNodeInfo (CubeInfo *, const unsigned long, const unsigned long, NodeInfo *) |
| static MagickBooleanType | AssignImageColors (Image *, CubeInfo *) |
| static MagickBooleanType | ClassifyImageColors (CubeInfo *, const Image *, ExceptionInfo *) |
| static MagickBooleanType | DitherImage (Image *, CubeInfo *) |
| static MagickBooleanType | SetGrayscaleImage (Image *) |
| static unsigned long | DefineImageColormap (Image *, CubeInfo *, NodeInfo *) |
| static void | ClosestColor (const Image *, CubeInfo *, const NodeInfo *) |
| static void | DestroyCubeInfo (CubeInfo *) |
| static void | PruneLevel (const Image *, CubeInfo *, const NodeInfo *) |
| static void | PruneToCubeDepth (const Image *, CubeInfo *, const NodeInfo *) |
| static void | ReduceImageColors (const Image *, CubeInfo *) |
| MagickExport QuantizeInfo * | AcquireQuantizeInfo (const ImageInfo *image_info) |
| static void | AssociateAlphaPixel (const CubeInfo *cube_info, const PixelPacket *pixel, RealPixelPacket *alpha_pixel) |
| static Quantum | ClipToQuantum (const MagickRealType value) |
| static unsigned long | ColorToNodeId (const CubeInfo *cube_info, const RealPixelPacket *pixel, unsigned long index) |
| static MagickBooleanType | IsSameColor (const Image *image, const PixelPacket *p, const PixelPacket *q) |
| static void | SetAssociatedAlpha (const Image *image, CubeInfo *cube_info) |
| MagickExport QuantizeInfo * | CloneQuantizeInfo (const QuantizeInfo *quantize_info) |
| MagickExport MagickBooleanType | CompressImageColormap (Image *image) |
| MagickExport QuantizeInfo * | DestroyQuantizeInfo (QuantizeInfo *quantize_info) |
| static MagickBooleanType | FloydSteinbergDither (Image *image, CubeInfo *cube_info) |
| static MagickBooleanType | RiemersmaDither (Image *, CacheView *, CubeInfo *, const unsigned int) |
| static void | Riemersma (Image *image, CacheView *image_view, CubeInfo *cube_info, const unsigned long level, const unsigned int direction) |
| static long | MagickMax (const long x, const long y) |
| static long | MagickMin (const long x, const long y) |
| MagickExport MagickBooleanType | GetImageQuantizeError (Image *image) |
| MagickExport void | GetQuantizeInfo (QuantizeInfo *quantize_info) |
| MagickExport MagickBooleanType | PosterizeImage (Image *image, const unsigned long levels, const MagickBooleanType dither) |
| static void | PruneChild (const Image *image, CubeInfo *cube_info, const NodeInfo *node_info) |
| MagickExport MagickBooleanType | QuantizeImage (const QuantizeInfo *quantize_info, Image *image) |
| MagickExport MagickBooleanType | QuantizeImages (const QuantizeInfo *quantize_info, Image *images) |
| static void | Reduce (const Image *image, CubeInfo *cube_info, const NodeInfo *node_info) |
| MagickExport MagickBooleanType | RemapImage (const QuantizeInfo *quantize_info, Image *image, const Image *remap_image) |
| MagickExport MagickBooleanType | RemapImages (const QuantizeInfo *quantize_info, Image *images, const Image *remap_image) |
| static int | IntensityCompare (const void *x, const void *y) |
| #define AssignImageTag "Assign/Image" |
Referenced by AssignImageColors(), and QuantizeImages().
| #define CacheShift 2 |
Definition at line 201 of file quantize.c.
Referenced by FloydSteinbergDither(), GetCubeInfo(), and RiemersmaDither().
| #define ClassifyImageTag "Classify/Image" |
Referenced by ClassifyImageColors().
| #define DitherImageTag "Dither/Image" |
| #define DitherImageTag "Dither/Image" |
Referenced by FloydSteinbergDither(), OrderedPosterizeImageChannel(), and RiemersmaDither().
| #define ErrorQueueLength 16 |
Definition at line 202 of file quantize.c.
Referenced by DitherImage(), GetCubeInfo(), and RiemersmaDither().
| #define MaxNodes 266817 |
Definition at line 203 of file quantize.c.
Referenced by ClassifyImageColors().
| #define MaxTreeDepth 8 |
Definition at line 204 of file quantize.c.
| #define NodesInAList 1920 |
Definition at line 205 of file quantize.c.
| #define ReduceImageTag "Reduce/Image" |
Referenced by ReduceImageColors().
| typedef struct _RealPixelPacket RealPixelPacket |
| MagickExport QuantizeInfo* AcquireQuantizeInfo | ( | const ImageInfo * | image_info | ) |
Definition at line 359 of file quantize.c.
References AcquireMagickMemory(), _ImageInfo::dither, _QuantizeInfo::dither, _QuantizeInfo::dither_method, GetImageOption(), GetQuantizeInfo(), MagickDitherOptions, MagickFalse, _QuantizeInfo::measure_error, ParseMagickOption(), ResourceLimitFatalError, ThrowFatalException, and _ImageInfo::verbose.
Referenced by PosterizeImage(), SetImageType(), and UniqueImageColors().
| static MagickBooleanType AssignImageColors | ( | Image * | image, | |
| CubeInfo * | cube_info | |||
| ) | [static] |
Definition at line 480 of file quantize.c.
References AcquireCacheView(), AcquireImageColormap(), AssignImageTag, _CubeInfo::associate_alpha, AssociateAlphaPixel(), _PixelPacket::blue, _NodeInfo::child, ClosestColor(), CMYColorspace, CMYKColorspace, _CubeInfo::color_number, _Image::colormap, _Image::colors, _CubeInfo::colors, _Image::colorspace, _QuantizeInfo::colorspace, ColorToNodeId(), _Image::columns, DefineImageColormap(), DestroyCacheView(), _CubeInfo::distance, _QuantizeInfo::dither, _QuantizeInfo::dither_method, DitherImage(), _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageQuantizeError(), GRAYColorspace, _PixelPacket::green, IsSameColor(), MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, NoDitherMethod, _QuantizeInfo::number_colors, _PixelPacket::opacity, _NodeInfo::parent, PixelIntensity(), PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelPacket::red, ResourceLimitError, RGBColorspace, _CubeInfo::root, _Image::rows, SetImageProgress(), _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 CubeInfo * | cube_info, | |
| const PixelPacket * | pixel, | |||
| RealPixelPacket * | alpha_pixel | |||
| ) | [inline, static] |
Definition at line 423 of file quantize.c.
References _CubeInfo::associate_alpha, _PixelPacket::blue, _RealPixelPacket::blue, _PixelPacket::green, _RealPixelPacket::green, MagickFalse, _RealPixelPacket::opacity, _PixelPacket::opacity, OpaqueOpacity, QuantumRange, QuantumScale, _PixelPacket::red, and _RealPixelPacket::red.
Referenced by AssignImageColors(), ClassifyImageColors(), FloydSteinbergDither(), and RiemersmaDither().
| static MagickBooleanType ClassifyImageColors | ( | CubeInfo * | cube_info, | |
| const Image * | image, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 710 of file quantize.c.
References AcquireCacheView(), _CubeInfo::associate_alpha, AssociateAlphaPixel(), _RealPixelPacket::blue, _NodeInfo::child, ClassifyImageTag, CMYColorspace, CMYKColorspace, _CubeInfo::colors, _Image::colorspace, _QuantizeInfo::colorspace, ColorToNodeId(), _Image::columns, _CubeInfo::depth, DestroyCacheView(), _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetNodeInfo(), GRAYColorspace, _RealPixelPacket::green, IsSameColor(), MagickFalse, MagickTrue, _CubeInfo::maximum_colors, MaxNodes, MaxTreeDepth, _CubeInfo::nodes, _NodeInfo::number_unique, _RealPixelPacket::opacity, PruneLevel(), PruneToCubeDepth(), _NodeInfo::quantize_error, _CubeInfo::quantize_info, QuantumRange, QuantumScale, _RealPixelPacket::red, ResourceLimitError, RGBColorspace, _CubeInfo::root, _Image::rows, SetAssociatedAlpha(), SetImageProgress(), ThrowMagickException(), _NodeInfo::total_color, TransformImageColorspace(), and UndefinedColorspace.
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
| static Quantum ClipToQuantum | ( | const MagickRealType | value | ) | [inline, static] |
Definition at line 445 of file quantize.c.
References QuantumRange.
Referenced by ColorToNodeId(), FloydSteinbergDither(), and RiemersmaDither().
| MagickExport QuantizeInfo* CloneQuantizeInfo | ( | const QuantizeInfo * | quantize_info | ) |
Definition at line 967 of file quantize.c.
References AcquireMagickMemory(), _QuantizeInfo::colorspace, _QuantizeInfo::dither, _QuantizeInfo::dither_method, GetQuantizeInfo(), _QuantizeInfo::measure_error, _QuantizeInfo::number_colors, ResourceLimitFatalError, ThrowFatalException, and _QuantizeInfo::tree_depth.
Referenced by GetCubeInfo(), and XGetResourceInfo().
| static void ClosestColor | ( | const Image * | image, | |
| CubeInfo * | cube_info, | |||
| const NodeInfo * | node_info | |||
| ) | [static] |
Definition at line 1016 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::color_number, _NodeInfo::color_number, _Image::colormap, _CubeInfo::distance, MagickFalse, _NodeInfo::number_unique, QuantumRange, QuantumScale, and _CubeInfo::target.
Referenced by AssignImageColors(), FloydSteinbergDither(), and RiemersmaDither().
| static unsigned long ColorToNodeId | ( | const CubeInfo * | cube_info, | |
| const RealPixelPacket * | pixel, | |||
| unsigned long | index | |||
| ) | [inline, static] |
Definition at line 454 of file quantize.c.
References _CubeInfo::associate_alpha, _RealPixelPacket::blue, ClipToQuantum(), _RealPixelPacket::green, MagickFalse, _RealPixelPacket::opacity, _RealPixelPacket::red, and ScaleQuantumToChar().
Referenced by AssignImageColors(), ClassifyImageColors(), FloydSteinbergDither(), and RiemersmaDither().
| MagickExport MagickBooleanType CompressImageColormap | ( | Image * | image | ) |
Definition at line 1108 of file quantize.c.
References _Image::colors, _Image::debug, _Image::exception, _Image::filename, GetMagickModule, GetQuantizeInfo(), IsPaletteImage(), LogMagickEvent(), MagickFalse, MagickSignature, MaxTreeDepth, _QuantizeInfo::number_colors, QuantizeImage(), _Image::signature, TraceEvent, and _QuantizeInfo::tree_depth.
| static unsigned long DefineImageColormap | ( | Image * | image, | |
| CubeInfo * | cube_info, | |||
| NodeInfo * | node_info | |||
| ) | [static] |
Definition at line 1156 of file quantize.c.
References _CubeInfo::associate_alpha, _RealPixelPacket::blue, _NodeInfo::child, _NodeInfo::color_number, _Image::colormap, _Image::colors, _RealPixelPacket::green, MagickEpsilon, MagickFalse, _NodeInfo::number_unique, _RealPixelPacket::opacity, OpaqueOpacity, QuantumRange, QuantumScale, _RealPixelPacket::red, RoundToQuantum(), _NodeInfo::total_color, _CubeInfo::transparent_index, and _CubeInfo::transparent_pixels.
Referenced by AssignImageColors().
| static void DestroyCubeInfo | ( | CubeInfo * | cube_info | ) |
Definition at line 1261 of file quantize.c.
References _CubeInfo::cache, DestroyQuantizeInfo(), _Nodes::next, _CubeInfo::node_queue, _Nodes::nodes, _CubeInfo::quantize_info, and RelinquishMagickMemory().
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
| MagickExport QuantizeInfo* DestroyQuantizeInfo | ( | QuantizeInfo * | quantize_info | ) |
Definition at line 1307 of file quantize.c.
References GetMagickModule, LogMagickEvent(), MagickSignature, RelinquishMagickMemory(), _QuantizeInfo::signature, and TraceEvent.
Referenced by DestroyCubeInfo(), PosterizeImage(), SetImageType(), UniqueImageColors(), and XDestroyResourceInfo().
| static MagickBooleanType DitherImage | ( | Image * | image, | |
| CubeInfo * | cube_info | |||
| ) |
Definition at line 1754 of file quantize.c.
References AcquireCacheView(), _Image::columns, DestroyCacheView(), _QuantizeInfo::dither_method, _CubeInfo::error, ErrorQueueLength, FloydSteinbergDither(), FloydSteinbergDitherMethod, ForgetGravity, MagickMax(), NorthGravity, _CubeInfo::offset, _CubeInfo::quantize_info, ResetMagickMemory(), Riemersma(), RiemersmaDither(), _Image::rows, _CubeInfo::span, _CubeInfo::x, and _CubeInfo::y.
Referenced by AssignImageColors().
| static MagickBooleanType FloydSteinbergDither | ( | Image * | image, | |
| CubeInfo * | cube_info | |||
| ) | [static] |
Definition at line 1345 of file quantize.c.
References AcquireCacheView(), AcquireQuantumMemory(), _CubeInfo::associate_alpha, AssociateAlphaPixel(), _PixelPacket::blue, _RealPixelPacket::blue, _CubeInfo::cache, CacheShift, _NodeInfo::child, ClipToQuantum(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, ColorToNodeId(), _Image::columns, DestroyCacheView(), _CubeInfo::distance, DitherImageTag, _Image::exception, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), _PixelPacket::green, _RealPixelPacket::green, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, _CubeInfo::offset, _PixelPacket::opacity, _RealPixelPacket::opacity, _NodeInfo::parent, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelPacket::red, _RealPixelPacket::red, RelinquishMagickMemory(), _CubeInfo::root, _Image::rows, ScaleQuantumToChar(), SetImageProgress(), _CubeInfo::span, _Image::storage_class, SyncCacheViewAuthenticPixels(), and _CubeInfo::target.
Referenced by DitherImage().
| static CubeInfo * GetCubeInfo | ( | const QuantizeInfo * | quantize_info, | |
| const unsigned long | depth, | |||
| const unsigned long | maximum_colors | |||
| ) | [static] |
Definition at line 1826 of file quantize.c.
References AcquireMagickMemory(), AcquireQuantumMemory(), _CubeInfo::cache, CacheShift, CloneQuantizeInfo(), _CubeInfo::depth, _QuantizeInfo::dither, ErrorQueueLength, GetNodeInfo(), MagickFalse, _CubeInfo::maximum_colors, MaxTreeDepth, _NodeInfo::parent, _CubeInfo::quantize_info, QuantumRange, ResetMagickMemory(), _CubeInfo::root, and _CubeInfo::weights.
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
| MagickExport MagickBooleanType GetImageQuantizeError | ( | Image * | image | ) |
Definition at line 2006 of file quantize.c.
References AcquireCacheView(), _PixelPacket::blue, _Image::colormap, _Image::columns, _Image::debug, DestroyCacheView(), DirectClass, _Image::error, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewVirtualPixels(), GetMagickModule, GetNumberColors(), _PixelPacket::green, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::matte, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, _PixelPacket::opacity, QuantumRange, QuantumScale, _PixelPacket::red, ResetMagickMemory(), _Image::rows, _Image::signature, _Image::storage_class, _Image::total_colors, and TraceEvent.
Referenced by AssignImageColors(), and QuantizationError().
| static NodeInfo * GetNodeInfo | ( | CubeInfo * | cube_info, | |
| const unsigned long | id, | |||
| const unsigned long | level, | |||
| NodeInfo * | parent | |||
| ) | [static] |
Definition at line 1931 of file quantize.c.
References AcquireMagickMemory(), AcquireQuantumMemory(), _CubeInfo::free_nodes, _NodeInfo::id, _NodeInfo::level, _Nodes::next, _CubeInfo::next_node, _CubeInfo::node_queue, _CubeInfo::nodes, _Nodes::nodes, NodesInAList, _NodeInfo::parent, and ResetMagickMemory().
Referenced by ClassifyImageColors(), and GetCubeInfo().
| MagickExport void GetQuantizeInfo | ( | QuantizeInfo * | quantize_info | ) |
Definition at line 2117 of file quantize.c.
References _QuantizeInfo::colorspace, _QuantizeInfo::dither, _QuantizeInfo::dither_method, GetMagickModule, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _QuantizeInfo::measure_error, _QuantizeInfo::number_colors, ResetMagickMemory(), RiemersmaDitherMethod, _QuantizeInfo::signature, TraceEvent, and UndefinedColorspace.
Referenced by AcquireQuantizeInfo(), CloneQuantizeInfo(), CompressImageColormap(), MapImage(), MapImages(), and PreviewImage().
| static int IntensityCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
Definition at line 2958 of file quantize.c.
References PixelIntensityToQuantum().
Referenced by SetGrayscaleImage().
| static MagickBooleanType IsSameColor | ( | const Image * | image, | |
| const PixelPacket * | p, | |||
| const PixelPacket * | q | |||
| ) | [inline, static] |
Definition at line 470 of file quantize.c.
References _PixelPacket::blue, _PixelPacket::green, MagickFalse, MagickTrue, _Image::matte, _PixelPacket::opacity, and _PixelPacket::red.
Referenced by AssignImageColors(), ClassifyImageColors(), and SetGrayscaleImage().
| static long MagickMax | ( | const long | x, | |
| const long | y | |||
| ) | [inline, static] |
Definition at line 1740 of file quantize.c.
Referenced by DitherImage(), and PosterizeImage().
| static long MagickMin | ( | const long | x, | |
| const long | y | |||
| ) | [inline, static] |
Definition at line 1747 of file quantize.c.
Referenced by PosterizeImage().
| MagickExport MagickBooleanType PosterizeImage | ( | Image * | image, | |
| const unsigned long | levels, | |||
| const MagickBooleanType | dither | |||
| ) |
Definition at line 2160 of file quantize.c.
References AcquireCacheView(), AcquireImage(), AcquireImageColormap(), AcquireQuantizeInfo(), _PixelPacket::blue, _Image::colormap, _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), DestroyQuantizeInfo(), _QuantizeInfo::dither, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetMagickModule, _PixelPacket::green, LogMagickEvent(), MagickFalse, MagickMax(), MagickMin(), MagickSignature, MaxColormapSize, _PixelPacket::opacity, OpaqueOpacity, QuantumRange, QueueCacheViewAuthenticPixels(), _PixelPacket::red, RemapImage(), SetImageExtent(), _Image::signature, SyncCacheViewAuthenticPixels(), and TraceEvent.
| static void PruneChild | ( | const Image * | image, | |
| CubeInfo * | cube_info, | |||
| const NodeInfo * | node_info | |||
| ) | [static] |
Definition at line 2288 of file quantize.c.
References _CubeInfo::associate_alpha, _RealPixelPacket::blue, _NodeInfo::child, _RealPixelPacket::green, _NodeInfo::id, MagickFalse, _CubeInfo::nodes, _NodeInfo::number_unique, _RealPixelPacket::opacity, _NodeInfo::parent, _RealPixelPacket::red, and _NodeInfo::total_color.
Referenced by PruneLevel(), PruneToCubeDepth(), and Reduce().
Definition at line 2348 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::depth, _NodeInfo::level, MagickFalse, and PruneChild().
Referenced by ClassifyImageColors().
| static void PruneToCubeDepth | ( | const Image * | image, | |
| CubeInfo * | cube_info, | |||
| const NodeInfo * | node_info | |||
| ) |
Definition at line 2395 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::depth, _NodeInfo::level, MagickFalse, and PruneChild().
Referenced by ClassifyImageColors().
| MagickExport MagickBooleanType QuantizeImage | ( | const QuantizeInfo * | quantize_info, | |
| Image * | image | |||
| ) |
Definition at line 2443 of file quantize.c.
References AssignImageColors(), ClassifyImageColors(), _Image::colors, _Image::debug, DestroyCubeInfo(), _QuantizeInfo::dither, _Image::exception, _Image::filename, GetCubeInfo(), GetMagickModule, IsGrayImage(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::matte, MaxColormapSize, _QuantizeInfo::number_colors, PseudoClass, ReduceImageColors(), ResourceLimitError, SetGrayscaleImage(), _Image::signature, _QuantizeInfo::signature, _Image::storage_class, ThrowBinaryException, TraceEvent, and _QuantizeInfo::tree_depth.
Referenced by CompressImageColormap(), PreviewImage(), QuantizeImages(), SetImageType(), UniqueImageColors(), and XMakeStandardColormap().
| MagickExport MagickBooleanType QuantizeImages | ( | const QuantizeInfo * | quantize_info, | |
| Image * | images | |||
| ) |
Definition at line 2538 of file quantize.c.
References AssignImageColors(), AssignImageTag, ClassifyImageColors(), _Image::client_data, _Image::debug, DestroyCubeInfo(), _QuantizeInfo::dither, _Image::exception, _Image::filename, GetCubeInfo(), GetImageListLength(), GetMagickModule, GetNextImageInList(), LogMagickEvent(), MagickFalse, MagickSignature, MaxColormapSize, _QuantizeInfo::number_colors, QuantizeImage(), ReduceImageColors(), ResourceLimitError, SetImageProgress(), SetImageProgressMonitor(), _Image::signature, _QuantizeInfo::signature, ThrowMagickException(), TraceEvent, and _QuantizeInfo::tree_depth.
Referenced by RemapImages().
| static void Reduce | ( | const Image * | image, | |
| CubeInfo * | cube_info, | |||
| const NodeInfo * | node_info | |||
| ) | [static] |
Definition at line 2675 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::colors, MagickFalse, _CubeInfo::next_threshold, _NodeInfo::number_unique, PruneChild(), _CubeInfo::pruning_threshold, and _NodeInfo::quantize_error.
Referenced by ReduceImageColors().
Definition at line 2759 of file quantize.c.
References _CubeInfo::colors, MagickFalse, _CubeInfo::maximum_colors, _CubeInfo::next_threshold, _CubeInfo::pruning_threshold, _NodeInfo::quantize_error, Reduce(), ReduceImageTag, _CubeInfo::root, and SetImageProgress().
Referenced by QuantizeImage(), and QuantizeImages().
| MagickExport MagickBooleanType RemapImage | ( | const QuantizeInfo * | quantize_info, | |
| Image * | image, | |||
| const Image * | remap_image | |||
| ) |
Definition at line 2815 of file quantize.c.
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, _Image::debug, DestroyCubeInfo(), _Image::exception, _Image::filename, GetCubeInfo(), GetMagickModule, LogMagickEvent(), MagickFalse, MagickSignature, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, ResourceLimitError, _Image::signature, ThrowBinaryException, and TraceEvent.
Referenced by AffinityImage(), MapImage(), PosterizeImage(), and XMakeStandardColormap().
| MagickExport MagickBooleanType RemapImages | ( | const QuantizeInfo * | quantize_info, | |
| Image * | images, | |||
| const Image * | remap_image | |||
| ) |
Definition at line 2879 of file quantize.c.
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, _Image::debug, DestroyCubeInfo(), _Image::exception, _Image::filename, GetCubeInfo(), GetMagickModule, GetNextImageInList(), LogMagickEvent(), MagickFalse, MagickSignature, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, QuantizeImages(), ResourceLimitError, _Image::signature, ThrowBinaryException, and TraceEvent.
Referenced by AffinityImages(), and MapImages().
| static void Riemersma | ( | Image * | image, | |
| CacheView * | image_view, | |||
| CubeInfo * | cube_info, | |||
| const unsigned long | level, | |||
| const unsigned int | direction | |||
| ) | [static] |
Definition at line 1519 of file quantize.c.
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 | |||
| ) | [static] |
Definition at line 1608 of file quantize.c.
References _CubeInfo::associate_alpha, AssociateAlphaPixel(), _PixelPacket::blue, _RealPixelPacket::blue, _CubeInfo::cache, CacheShift, _NodeInfo::child, ClipToQuantum(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, ColorToNodeId(), _Image::columns, CopyMagickMemory(), _CubeInfo::distance, DitherImageTag, EastGravity, _CubeInfo::error, ErrorQueueLength, _Image::exception, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), _PixelPacket::green, _RealPixelPacket::green, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, NorthGravity, _CubeInfo::offset, _PixelPacket::opacity, _RealPixelPacket::opacity, _NodeInfo::parent, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelPacket::red, _RealPixelPacket::red, _CubeInfo::root, _Image::rows, ScaleQuantumToChar(), SetImageProgress(), SouthGravity, _CubeInfo::span, _Image::storage_class, SyncCacheViewAuthenticPixels(), _CubeInfo::target, _CubeInfo::weights, WestGravity, _CubeInfo::x, and _CubeInfo::y.
Referenced by DitherImage(), and Riemersma().
Definition at line 696 of file quantize.c.
References _CubeInfo::associate_alpha, _QuantizeInfo::colorspace, GRAYColorspace, MagickFalse, _Image::matte, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, and TransparentColorspace.
Referenced by ClassifyImageColors().
| static MagickBooleanType SetGrayscaleImage | ( | Image * | image | ) |
Definition at line 2978 of file quantize.c.
References AcquireCacheView(), AcquireImageColormap(), AcquireQuantumMemory(), BilevelType, _Image::colormap, _Image::colors, _Image::columns, DestroyCacheView(), _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GRAYColorspace, GrayscaleType, IntensityCompare(), IsMonochromeImage(), IsSameColor(), MagickFalse, MagickSignature, MagickTrue, MaxMap, _PixelPacket::opacity, PseudoClass, RelinquishMagickMemory(), ResourceLimitError, _Image::rows, ScaleQuantumToMap(), _Image::signature, _Image::storage_class, SyncCacheViewAuthenticPixels(), ThrowBinaryException, TransformImageColorspace(), and _Image::type.
Referenced by QuantizeImage().
1.6.1