#include "magick/studio.h"#include "magick/artifact.h"#include "magick/attribute.h"#include "magick/cache-view.h"#include "magick/color.h"#include "magick/color-private.h"#include "magick/colormap.h"#include "magick/colorspace.h"#include "magick/colorspace-private.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/resource_.h"#include "magick/string_.h"#include "magick/string-private.h"#include "magick/thread-private.h"
Data Structures | |
| 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 _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 *) |
| static MagickBooleanType | ClassifyImageColors (CubeInfo *, const Image *, ExceptionInfo *) |
| static MagickBooleanType | DitherImage (Image *, CubeInfo *) |
| static MagickBooleanType | SetGrayscaleImage (Image *) |
| 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 CubeInfo *cube_info, const PixelPacket *pixel, DoublePixelPacket *alpha_pixel) |
| static size_t | ColorToNodeId (const CubeInfo *cube_info, const DoublePixelPacket *pixel, size_t 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 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) |
| static MagickBooleanType | RiemersmaDither (Image *, CacheView *, CubeInfo *, const unsigned int) |
| static void | Riemersma (Image *image, CacheView *image_view, CubeInfo *cube_info, const size_t level, const unsigned int direction) |
| MagickExport MagickBooleanType | GetImageQuantizeError (Image *image) |
| MagickExport void | GetQuantizeInfo (QuantizeInfo *quantize_info) |
| static double | MagickRound (double x) |
| MagickExport MagickBooleanType | PosterizeImage (Image *image, const size_t levels, const MagickBooleanType dither) |
| MagickExport MagickBooleanType | PosterizeImageChannel (Image *image, const ChannelType channel, const size_t levels, const MagickBooleanType dither) |
| static void | PruneChild (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 size_t | QuantizeErrorFlatten (const CubeInfo *cube_info, const NodeInfo *node_info, const ssize_t offset, MagickRealType *quantize_error) |
| static void | Reduce (CubeInfo *cube_info, const NodeInfo *node_info) |
| static int | MagickRealTypeCompare (const void *error_p, const void *error_q) |
| 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 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(), OrderedPosterizeImageChannel(), 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 PosterizeImageChannel().
| #define PosterizePixel | ( | pixel | ) |
ClampToQuantum((MagickRealType) QuantumRange*( \ MagickRound(QuantumScale*pixel*(levels-1)))/MagickMax((ssize_t) levels-1,1))
Referenced by PosterizeImageChannel().
| #define RedShift | ( | pixel | ) | (((pixel) >> CacheShift) << (0*(8-CacheShift))) |
Referenced by CacheOffset().
| #define ReduceImageTag "Reduce/Image" |
Referenced by ReduceImageColors().
| 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 AcquireMagickMemory(), _ImageInfo::dither, _QuantizeInfo::dither, _QuantizeInfo::dither_method, GetImageOption(), GetQuantizeInfo(), MagickDitherOptions, MagickFalse, _QuantizeInfo::measure_error, ParseCommandOption(), ResourceLimitFatalError, ThrowFatalException, and _ImageInfo::verbose.
Referenced by PosterizeImageChannel(), and SetImageType().
| static MagickBooleanType AssignImageColors | ( | Image * | image, | |
| CubeInfo * | cube_info | |||
| ) | [static] |
References AcquireAuthenticCacheView(), AcquireImageColormap(), AssignImageTag, _CubeInfo::associate_alpha, AssociateAlphaPixel(), _PixelPacket::blue, _NodeInfo::child, ClosestColor(), _CubeInfo::color_number, _Image::colormap, _Image::colors, _QuantizeInfo::colorspace, _Image::colorspace, ColorToNodeId(), _Image::columns, DefineImageColormap(), DestroyCacheView(), _CubeInfo::distance, _QuantizeInfo::dither, _QuantizeInfo::dither_method, DitherImage(), _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageQuantizeError(), GetPixelLuma(), GRAYColorspace, _PixelPacket::green, IsSameColor(), IssRGBCompatibleColorspace(), LinearGRAYColorspace, magick_restrict, MagickFalse, MagickTrue, _CubeInfo::maximum_colors, MaxTreeDepth, _QuantizeInfo::measure_error, NoDitherMethod, _QuantizeInfo::number_colors, _PixelPacket::opacity, _NodeInfo::parent, _Image::progress_monitor, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelPacket::red, ResourceLimitError, _CubeInfo::root, _Image::rows, SetImageProgress(), SetPixelIndex, SetPixelOpacity, SetPixelRgb, _Image::storage_class, SyncCacheViewAuthenticPixels(), SyncImage(), _CubeInfo::target, ThrowBinaryImageException, 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, | |||
| DoublePixelPacket * | alpha_pixel | |||
| ) | [inline, static] |
References _CubeInfo::associate_alpha, _DoublePixelPacket::blue, GetPixelBlue, GetPixelGreen, GetPixelOpacity, GetPixelRed, _DoublePixelPacket::green, _DoublePixelPacket::index, MagickFalse, _DoublePixelPacket::opacity, _PixelPacket::opacity, OpaqueOpacity, QuantumRange, QuantumScale, and _DoublePixelPacket::red.
Referenced by AssignImageColors(), ClassifyImageColors(), FloydSteinbergDither(), and RiemersmaDither().
| static ssize_t CacheOffset | ( | CubeInfo * | cube_info, | |
| const DoublePixelPacket * | pixel | |||
| ) | [inline, static] |
References AlphaShift, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, BlueShift, ClampPixel(), _DoublePixelPacket::green, GreenShift, MagickFalse, _DoublePixelPacket::opacity, _DoublePixelPacket::red, RedShift, and ScaleQuantumToChar().
Referenced by FloydSteinbergDither(), and RiemersmaDither().
| static MagickBooleanType ClassifyImageColors | ( | CubeInfo * | cube_info, | |
| const Image * | image, | |||
| ExceptionInfo * | exception | |||
| ) |
References AcquireVirtualCacheView(), _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(), _DoublePixelPacket::green, _DoublePixelPacket::index, IsNaN, IsSameColor(), IssRGBCompatibleColorspace(), magick_restrict, MagickFalse, MagickTrue, _CubeInfo::maximum_colors, MaxNodes, MaxTreeDepth, _CubeInfo::nodes, _NodeInfo::number_unique, _DoublePixelPacket::opacity, OpaqueOpacity, 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 | ) |
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] |
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::color_number, _NodeInfo::color_number, _Image::colormap, _CubeInfo::distance, GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelRed, 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 _CubeInfo::associate_alpha, ClampPixel(), GetPixelBlue, GetPixelGreen, GetPixelOpacity, GetPixelRed, MagickFalse, and ScaleQuantumToChar().
Referenced by AssignImageColors(), ClassifyImageColors(), FloydSteinbergDither(), and RiemersmaDither().
| MagickExport MagickBooleanType CompressImageColormap | ( | Image * | image | ) |
References _Image::colors, _Image::debug, _Image::exception, _Image::filename, GetMagickModule, GetQuantizeInfo(), IsPaletteImage(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, QuantizeImage(), _Image::signature, TraceEvent, and _QuantizeInfo::tree_depth.
| static size_t DefineImageColormap | ( | Image * | image, | |
| CubeInfo * | cube_info, | |||
| NodeInfo * | node_info | |||
| ) | [static] |
References _CubeInfo::associate_alpha, _DoublePixelPacket::blue, _NodeInfo::child, ClampToQuantum(), _NodeInfo::color_number, _Image::colormap, _Image::colors, _DoublePixelPacket::green, magick_restrict, MagickFalse, _NodeInfo::number_unique, _DoublePixelPacket::opacity, OpaqueOpacity, PerceptibleReciprocal(), QuantumRange, QuantumScale, _DoublePixelPacket::red, SetPixelBlue, SetPixelGreen, SetPixelOpacity, SetPixelRed, _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(), PosterizeImageChannel(), SetImageType(), and XDestroyResourceInfo().
| static MagickBooleanType DitherImage | ( | Image * | image, | |
| CubeInfo * | cube_info | |||
| ) |
References AcquireAuthenticCacheView(), _Image::columns, DestroyCacheView(), _QuantizeInfo::dither_method, _CubeInfo::error, ErrorQueueLength, _Image::exception, 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 | |||
| ) | [static] |
References AcquireAuthenticCacheView(), AcquirePixelThreadSet(), _CubeInfo::associate_alpha, AssociateAlphaPixel(), _DoublePixelPacket::blue, _CubeInfo::cache, CacheOffset(), _NodeInfo::child, ClampPixel(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, ColorToNodeId(), _Image::columns, DestroyCacheView(), DestroyPixelThreadSet(), _CubeInfo::distance, DitherImageTag, _Image::exception, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageArtifact(), GetOpenMPThreadId(), _DoublePixelPacket::green, magick_restrict, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, _PixelPacket::opacity, _DoublePixelPacket::opacity, _NodeInfo::parent, _Image::progress_monitor, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _DoublePixelPacket::red, _CubeInfo::root, _Image::rows, SetImageProgress(), SetPixelIndex, SetPixelOpacity, SetPixelRgb, _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, ErrorQueueLength, GetNodeInfo(), GetVirtualMemoryBlob(), MagickFalse, _CubeInfo::maximum_colors, MaxTreeDepth, _CubeInfo::memory_info, _NodeInfo::parent, PerceptibleReciprocal(), _CubeInfo::quantize_info, QuantumRange, _CubeInfo::root, and _CubeInfo::weights.
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
| MagickExport MagickBooleanType GetImageQuantizeError | ( | Image * | image | ) |
References AcquireVirtualCacheView(), _PixelPacket::blue, _Image::colormap, _Image::columns, _Image::debug, DestroyCacheView(), DirectClass, _Image::error, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewVirtualPixels(), GetMagickModule, GetNumberColors(), GetPixelAlpha, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelRed, _PixelPacket::green, LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::matte, _ErrorInfo::mean_error_per_pixel, _ErrorInfo::normalized_maximum_error, _ErrorInfo::normalized_mean_error, _PixelPacket::opacity, PerceptibleReciprocal(), QuantumRange, QuantumScale, _PixelPacket::red, _Image::rows, _Image::signature, _Image::storage_class, _Image::total_colors, and TraceEvent.
Referenced by AssignImageColors(), and QuantizationError().
| 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, _QuantizeInfo::dither_method, GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _QuantizeInfo::measure_error, _QuantizeInfo::number_colors, 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] |
References PixelPacketIntensity().
Referenced by SetGrayscaleImage().
| static MagickBooleanType IsSameColor | ( | const Image * | image, | |
| const PixelPacket * | p, | |||
| const PixelPacket * | q | |||
| ) | [inline, static] |
References GetPixelBlue, GetPixelGreen, GetPixelOpacity, GetPixelRed, MagickFalse, MagickTrue, and _Image::matte.
Referenced by AssignImageColors(), ClassifyImageColors(), and SetGrayscaleImage().
| static int MagickRealTypeCompare | ( | const void * | error_p, | |
| const void * | error_q | |||
| ) | [static] |
References MagickEpsilon.
Referenced by ReduceImageColors().
| static double MagickRound | ( | double | x | ) | [inline, static] |
| MagickExport MagickBooleanType PosterizeImage | ( | Image * | image, | |
| const size_t | levels, | |||
| const MagickBooleanType | dither | |||
| ) |
References DefaultChannels, and PosterizeImageChannel().
| MagickExport MagickBooleanType PosterizeImageChannel | ( | Image * | image, | |
| const ChannelType | channel, | |||
| const size_t | levels, | |||
| const MagickBooleanType | dither | |||
| ) |
References AcquireAuthenticCacheView(), AcquireQuantizeInfo(), _PixelPacket::blue, BlueChannel, CMYKColorspace, _Image::colormap, _Image::colors, _Image::colorspace, _Image::columns, _Image::debug, DestroyCacheView(), DestroyQuantizeInfo(), _QuantizeInfo::dither, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetMagickModule, GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelOpacity, GetPixelRed, _PixelPacket::green, GreenChannel, IndexChannel, LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickMin, MagickTrue, _Image::matte, MaxColormapSize, MaxTreeDepth, _QuantizeInfo::number_colors, _PixelPacket::opacity, OpacityChannel, PosterizeImageTag, PosterizePixel, _Image::progress_monitor, PseudoClass, QuantizeImage(), _PixelPacket::red, RedChannel, _Image::rows, SetImageProgress(), SetPixelBlue, SetPixelGreen, SetPixelIndex, SetPixelOpacity, SetPixelRed, _Image::signature, _Image::storage_class, SyncCacheViewAuthenticPixels(), TraceEvent, and _QuantizeInfo::tree_depth.
Referenced by PosterizeImage().
References _CubeInfo::associate_alpha, _DoublePixelPacket::blue, _NodeInfo::child, _DoublePixelPacket::green, _NodeInfo::id, MagickFalse, _CubeInfo::maximum_colors, _CubeInfo::nodes, _NodeInfo::number_unique, _DoublePixelPacket::opacity, _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 size_t QuantizeErrorFlatten | ( | const CubeInfo * | cube_info, | |
| const NodeInfo * | node_info, | |||
| const ssize_t | offset, | |||
| MagickRealType * | 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 | |||
| ) |
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, _Image::debug, DestroyCubeInfo(), _QuantizeInfo::dither, _Image::exception, _Image::filename, GetCubeInfo(), GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::matte, MaxColormapSize, _CubeInfo::maximum_colors, MaxTreeDepth, _QuantizeInfo::number_colors, ReduceImageColors(), ResourceLimitError, SetGrayscaleImage(), SetImageGray(), _Image::signature, _QuantizeInfo::signature, ThrowBinaryImageException, TraceEvent, and _QuantizeInfo::tree_depth.
Referenced by CompressImageColormap(), PosterizeImageChannel(), PreviewImage(), QuantizeImages(), SetImageType(), and XMakeStandardColormap().
| MagickExport MagickBooleanType QuantizeImages | ( | const QuantizeInfo * | quantize_info, | |
| Image * | images | |||
| ) |
References AssignImageColors(), AssignImageTag, ClassifyImageColors(), _Image::client_data, _Image::debug, DestroyCubeInfo(), _QuantizeInfo::dither, _Image::exception, _Image::filename, GetCubeInfo(), GetImageListLength(), GetMagickModule, GetNextImageInList(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxColormapSize, _QuantizeInfo::number_colors, QuantizeImage(), ReduceImageColors(), ResourceLimitError, SetImageProgress(), SetImageProgressMonitor(), _Image::signature, _QuantizeInfo::signature, ThrowMagickException(), TraceEvent, and _QuantizeInfo::tree_depth.
Referenced by RemapImages().
References AcquireQuantumMemory(), _CubeInfo::colors, MagickFalse, MagickRealTypeCompare(), _CubeInfo::maximum_colors, _CubeInfo::next_threshold, _CubeInfo::nodes, _CubeInfo::pruning_threshold, _NodeInfo::quantize_error, 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 | |||
| ) |
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, _Image::debug, DestroyCubeInfo(), _Image::exception, _Image::filename, GetCubeInfo(), GetMagickModule, LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, ResourceLimitError, _Image::signature, ThrowBinaryImageException, and TraceEvent.
Referenced by AffinityImage(), MapImage(), and XMakeStandardColormap().
| MagickExport MagickBooleanType RemapImages | ( | const QuantizeInfo * | quantize_info, | |
| Image * | images, | |||
| const Image * | remap_image | |||
| ) |
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, _Image::debug, DestroyCubeInfo(), _Image::exception, _Image::filename, GetCubeInfo(), GetMagickModule, GetNextImageInList(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, QuantizeImages(), ResourceLimitError, _Image::signature, ThrowBinaryImageException, and TraceEvent.
Referenced by AffinityImages(), and MapImages().
| static void Riemersma | ( | Image * | image, | |
| CacheView * | image_view, | |||
| CubeInfo * | cube_info, | |||
| const size_t | level, | |||
| const unsigned int | direction | |||
| ) | [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 | |||
| ) | [static] |
References _CubeInfo::associate_alpha, AssociateAlphaPixel(), _DoublePixelPacket::blue, _CubeInfo::cache, CacheOffset(), _NodeInfo::child, ClampPixel(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, ColorToNodeId(), _Image::columns, _CubeInfo::distance, DitherImageTag, EastGravity, _CubeInfo::error, ErrorQueueLength, _Image::exception, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), _DoublePixelPacket::green, magick_restrict, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, NorthGravity, _CubeInfo::offset, _PixelPacket::opacity, _DoublePixelPacket::opacity, _NodeInfo::parent, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _DoublePixelPacket::red, _CubeInfo::root, _Image::rows, SetImageProgress(), SetPixelOpacity, SetPixelRgb, SouthGravity, _CubeInfo::span, _Image::storage_class, SyncCacheViewAuthenticPixels(), _CubeInfo::target, _CubeInfo::weights, WestGravity, _CubeInfo::x, and _CubeInfo::y.
Referenced by DitherImage(), and Riemersma().
References _CubeInfo::associate_alpha, _QuantizeInfo::colorspace, GRAYColorspace, LinearGRAYColorspace, MagickFalse, _Image::matte, _QuantizeInfo::number_colors, and _CubeInfo::quantize_info.
Referenced by ClassifyImageColors().
| static MagickBooleanType SetGrayscaleImage | ( | Image * | image | ) |
References AcquireAuthenticCacheView(), AcquireImageColormap(), AcquireQuantumMemory(), BilevelType, _PixelPacket::blue, _Image::colormap, _Image::colors, _Image::columns, DestroyCacheView(), _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelRed, GRAYColorspace, GrayscaleType, _PixelPacket::green, IntensityCompare(), IsSameColor(), magick_restrict, MagickCoreSignature, MagickFalse, MagickMax, MagickTrue, MaxColormapSize, MaxMap, _PixelPacket::opacity, PseudoClass, _PixelPacket::red, RelinquishMagickMemory(), ResourceLimitError, _Image::rows, ScaleQuantumToMap(), SetImageMonochrome(), SetPixelIndex, _Image::signature, _Image::storage_class, SyncCacheViewAuthenticPixels(), ThrowBinaryException, TransformImageColorspace(), and _Image::type.
Referenced by QuantizeImage().
1.6.1