MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#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/compare.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/property.h"
#include "MagickCore/quantize.h"
#include "MagickCore/quantum.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/random_.h"
#include "MagickCore/resource_.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
Go to the source code of this file.
Data Structures | |
struct | _DoublePixelPacket |
struct | _NodeInfo |
struct | _Nodes |
struct | _CubeInfo |
struct | _KmeansInfo |
Macros | |
#define | CacheShift 2 |
#define | ErrorQueueLength 16 |
#define | ErrorRelativeWeight PerceptibleReciprocal(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 | KmeansImageTag "Kmeans/Image" |
#define | RandomColorComponent(info) (QuantumRange*GetPseudoRandomValue(info)) |
#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 |
typedef struct _KmeansInfo | KmeansInfo |
#define AlphaShift | ( | pixel | ) | (((pixel) >> CacheShift) << (3*(8-CacheShift))) |
#define AssignImageTag "Assign/Image" |
#define BlueShift | ( | pixel | ) | (((pixel) >> CacheShift) << (2*(8-CacheShift))) |
#define CacheShift 2 |
Definition at line 213 of file quantize.c.
#define ClassifyImageTag "Classify/Image" |
#define DitherImageTag "Dither/Image" |
#define DitherImageTag "Dither/Image" |
#define ErrorQueueLength 16 |
Definition at line 217 of file quantize.c.
#define ErrorRelativeWeight PerceptibleReciprocal(16) |
Definition at line 218 of file quantize.c.
#define GreenShift | ( | pixel | ) | (((pixel) >> CacheShift) << (1*(8-CacheShift))) |
#define KmeansImageTag "Kmeans/Image" |
#define MaxNodes 266817 |
Definition at line 219 of file quantize.c.
#define MaxTreeDepth 8 |
Definition at line 220 of file quantize.c.
#define NodesInAList 1920 |
Definition at line 221 of file quantize.c.
#define PosterizeImageTag "Posterize/Image" |
#define PosterizePixel | ( | pixel | ) |
#define RandomColorComponent | ( | info | ) | (QuantumRange*GetPseudoRandomValue(info)) |
#define RedShift | ( | pixel | ) | (((pixel) >> CacheShift) << (0*(8-CacheShift))) |
#define ReduceImageTag "Reduce/Image" |
typedef struct _DoublePixelPacket DoublePixelPacket |
typedef struct _KmeansInfo KmeansInfo |
|
static |
Definition at line 2395 of file quantize.c.
References AcquireQuantumMemory(), DestroyKmeansTLS(), GetMagickResourceLimit(), and ThreadResource.
Referenced by KmeansImage().
|
static |
Definition at line 1441 of file quantize.c.
References AcquireQuantumMemory(), DestroyPixelTLS(), GetMagickResourceLimit(), and ThreadResource.
Referenced by FloydSteinbergDither(), and ProfileImage().
MagickExport QuantizeInfo * AcquireQuantizeInfo | ( | const ImageInfo * | image_info | ) |
Definition at line 378 of file quantize.c.
References AcquireCriticalMemory(), _ImageInfo::dither, _QuantizeInfo::dither_method, GetImageOption(), GetQuantizeInfo(), MagickDitherOptions, MagickFalse, _QuantizeInfo::measure_error, NoDitherMethod, ParseCommandOption(), RiemersmaDitherMethod, and _ImageInfo::verbose.
Referenced by KmeansImage(), PosterizeImage(), and SetImageType().
|
static |
Definition at line 499 of file quantize.c.
References AcquireAuthenticCacheView(), _PixelInfo::alpha, AssignImageTag, _CubeInfo::associate_alpha, AssociateAlphaPixel(), _PixelInfo::blue, _NodeInfo::child, ClampToQuantum(), ClosestColor(), _CubeInfo::color_number, _Image::colormap, _Image::colors, _Image::colorspace, _QuantizeInfo::colorspace, ColorToNodeId(), _Image::columns, DestroyCacheView(), _CubeInfo::distance, _QuantizeInfo::dither_method, DitherImage(), GetCacheViewAuthenticPixels(), GetImageQuantizeError(), GetPixelChannels(), GetPixelInfoLuma(), GetPixelInfoPixel(), _PixelInfo::green, IsGrayColorspace(), IsPixelEquivalent(), IssRGBCompatibleColorspace(), magick_restrict, MagickFalse, MagickTrue, MaxTreeDepth, _QuantizeInfo::measure_error, NoDitherMethod, _QuantizeInfo::number_colors, _NodeInfo::parent, _Image::progress_monitor, PseudoClass, _CubeInfo::quantize_info, QuantumRange, _PixelInfo::red, _CubeInfo::root, _Image::rows, SetImageColormap(), SetImageProgress(), SetPixelAlpha(), SetPixelBlue(), SetPixelGreen(), SetPixelIndex(), SetPixelRed(), _Image::storage_class, SyncCacheViewAuthenticPixels(), SyncImage(), _CubeInfo::target, TransformImageColorspace(), _CubeInfo::transparent_index, _CubeInfo::transparent_pixels, and UndefinedColorspace.
Referenced by QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
|
inlinestatic |
Definition at line 441 of file quantize.c.
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().
|
inlinestatic |
Definition at line 463 of file quantize.c.
References _PixelInfo::alpha, _DoublePixelPacket::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().
|
inlinestatic |
Definition at line 1468 of file quantize.c.
References _DoublePixelPacket::alpha, AlphaShift, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, BlueShift, ClampPixel(), _DoublePixelPacket::green, GreenShift, MagickFalse, _DoublePixelPacket::red, and RedShift.
Referenced by FloydSteinbergDither(), and RiemersmaDither().
static MagickBooleanType ClassifyImageColors | ( | CubeInfo * | cube_info, |
const Image * | image, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 752 of file quantize.c.
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 KmeansImage(), QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
MagickExport QuantizeInfo * CloneQuantizeInfo | ( | const QuantizeInfo * | quantize_info | ) |
Definition at line 1048 of file quantize.c.
References AcquireCriticalMemory(), _QuantizeInfo::colorspace, _QuantizeInfo::dither_method, GetQuantizeInfo(), _QuantizeInfo::measure_error, _QuantizeInfo::number_colors, and _QuantizeInfo::tree_depth.
Referenced by GetCubeInfo().
|
static |
Definition at line 1094 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, ClosestColor(), _NodeInfo::color_number, _CubeInfo::color_number, _Image::colormap, _CubeInfo::distance, magick_restrict, MagickFalse, _NodeInfo::number_unique, QuantumScale, and _CubeInfo::target.
Referenced by AssignImageColors(), ClosestColor(), FloydSteinbergDither(), and RiemersmaDither().
|
inlinestatic |
Definition at line 485 of file quantize.c.
References _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, ClampPixel(), _DoublePixelPacket::green, MagickFalse, and _DoublePixelPacket::red.
Referenced by AssignImageColors(), ClassifyImageColors(), FloydSteinbergDither(), and RiemersmaDither().
MagickExport MagickBooleanType CompressImageColormap | ( | Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1190 of file quantize.c.
References _Image::colors, _Image::filename, GetMagickModule, GetQuantizeInfo(), IsEventLogging(), IsPaletteImage(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, QuantizeImage(), _Image::signature, TraceEvent, and _QuantizeInfo::tree_depth.
Definition at line 1238 of file quantize.c.
References _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, _NodeInfo::child, ClampToQuantum(), _NodeInfo::color_number, _Image::colormap, _Image::colors, DefineImageColormap(), _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 DefineImageColormap(), and SetImageColormap().
static void DestroyCubeInfo | ( | CubeInfo * | cube_info | ) |
Definition at line 1340 of file quantize.c.
References DestroyQuantizeInfo(), _CubeInfo::memory_info, _Nodes::next, _CubeInfo::node_queue, _Nodes::nodes, _CubeInfo::quantize_info, RelinquishMagickMemory(), and RelinquishVirtualMemory().
Referenced by KmeansImage(), QuantizeImage(), QuantizeImages(), RemapImage(), and RemapImages().
|
static |
Definition at line 2371 of file quantize.c.
References GetMagickResourceLimit(), RelinquishMagickMemory(), and ThreadResource.
Referenced by AcquireKmeansTLS(), and KmeansImage().
|
static |
Definition at line 1428 of file quantize.c.
References GetMagickResourceLimit(), RelinquishMagickMemory(), and ThreadResource.
Referenced by AcquirePixelTLS(), FloydSteinbergDither(), and ProfileImage().
MagickExport QuantizeInfo * DestroyQuantizeInfo | ( | QuantizeInfo * | quantize_info | ) |
Definition at line 1386 of file quantize.c.
References GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, RelinquishMagickMemory(), _QuantizeInfo::signature, and TraceEvent.
Referenced by DestroyCubeInfo(), KmeansImage(), PosterizeImage(), and SetImageType().
static MagickBooleanType DitherImage | ( | Image * | image, |
CubeInfo * | cube_info, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1962 of file quantize.c.
References AcquireAuthenticCacheView(), _Image::columns, DestroyCacheView(), _CubeInfo::diffusion, _QuantizeInfo::dither_method, _CubeInfo::error, ErrorQueueLength, FloydSteinbergDither(), ForgetGravity, GetImageArtifact(), MagickFalse, MagickMax, MagickTrue, NorthGravity, _CubeInfo::offset, _CubeInfo::quantize_info, Riemersma(), RiemersmaDither(), RiemersmaDitherMethod, _Image::rows, _CubeInfo::span, StringToDoubleInterval(), _CubeInfo::x, and _CubeInfo::y.
Referenced by AssignImageColors().
|
static |
Definition at line 2384 of file quantize.c.
References _PixelInfo::count.
Referenced by KmeansImage().
|
static |
Definition at line 1487 of file quantize.c.
References AcquireAuthenticCacheView(), AcquirePixelTLS(), _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(), DestroyPixelTLS(), _CubeInfo::diffusion, _CubeInfo::distance, DitherImageTag, GetCacheViewAuthenticPixels(), 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, SyncCacheViewAuthenticPixels(), and _CubeInfo::target.
Referenced by DitherImage().
|
static |
Definition at line 2039 of file quantize.c.
References AcquireMagickMemory(), AcquireVirtualMemory(), _CubeInfo::cache, CacheShift, CloneQuantizeInfo(), _CubeInfo::depth, _CubeInfo::diffusion, _QuantizeInfo::dither_method, ErrorQueueLength, ErrorRelativeWeight, GetNodeInfo(), GetVirtualMemoryBlob(), _CubeInfo::maximum_colors, MaxTreeDepth, _CubeInfo::memory_info, NoDitherMethod, _NodeInfo::parent, PerceptibleReciprocal(), _CubeInfo::quantize_info, _CubeInfo::root, and _CubeInfo::weights.
MagickExport MagickBooleanType GetImageQuantizeError | ( | Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 2208 of file quantize.c.
References AcquireVirtualCacheView(), _PixelInfo::alpha, _Image::alpha_trait, _PixelInfo::blue, _Image::colormap, _Image::columns, DestroyCacheView(), DirectClass, _Image::error, _Image::filename, GetCacheViewVirtualPixels(), GetMagickModule, GetNumberColors(), GetPixelAlpha(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelIndex(), GetPixelRed(), _PixelInfo::green, IsEventLogging(), 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, TraceEvent, and UndefinedPixelTrait.
Referenced by AssignImageColors().
|
static |
Definition at line 2130 of file quantize.c.
References AcquireMagickMemory(), AcquireQuantumMemory(), _CubeInfo::free_nodes, _NodeInfo::id, _NodeInfo::level, _Nodes::next, _CubeInfo::next_node, _CubeInfo::node_queue, _Nodes::nodes, _CubeInfo::nodes, NodesInAList, and _NodeInfo::parent.
Referenced by ClassifyImageColors(), and GetCubeInfo().
MagickExport void GetQuantizeInfo | ( | QuantizeInfo * | quantize_info | ) |
Definition at line 2312 of file quantize.c.
References _QuantizeInfo::colorspace, _QuantizeInfo::dither_method, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _QuantizeInfo::measure_error, _QuantizeInfo::number_colors, RiemersmaDitherMethod, _QuantizeInfo::signature, TraceEvent, and UndefinedColorspace.
Referenced by AcquireQuantizeInfo(), CloneQuantizeInfo(), CompressImageColormap(), and PreviewImage().
|
static |
Definition at line 3756 of file quantize.c.
References GetPixelInfoIntensity().
Referenced by SetGrayscaleImage().
MagickExport MagickBooleanType KmeansImage | ( | Image * | image, |
const size_t | number_colors, | ||
const size_t | max_iterations, | ||
const double | tolerance, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2466 of file quantize.c.
References AcquireAuthenticCacheView(), AcquireImageColormap(), AcquireKmeansTLS(), AcquireQuantizeInfo(), AcquireRandomInfo(), AllCompliance, _PixelInfo::alpha, _KmeansInfo::alpha, _Image::alpha_trait, _PixelInfo::black, _KmeansInfo::black, _PixelInfo::blue, _KmeansInfo::blue, ClassifyImageColors(), CloneImage(), CMYKColorspace, _Image::colormap, _CubeInfo::colors, _Image::colors, _Image::colorspace, _QuantizeInfo::colorspace, _Image::columns, CopyMagickString(), _PixelInfo::count, _KmeansInfo::count, _Image::debug, DestroyCacheView(), DestroyCubeInfo(), DestroyImage(), DestroyKmeansTLS(), DestroyQuantizeInfo(), DestroyRandomInfo(), _KmeansInfo::distortion, _QuantizeInfo::dither_method, DominantColorCompare(), _Image::filename, FormatLocaleFile(), GetCacheViewAuthenticPixels(), GetColorTuple(), GetCubeInfo(), GetImageArtifact(), GetMagickModule, GetMagickPrecision(), GetMagickResourceLimit(), GetOpenMPThreadId(), GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelRed(), _PixelInfo::green, _KmeansInfo::green, ImageEvent, IsEventLogging(), IsStringTrue(), KmeansImageTag, KmeansMetric(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickMin, MagickPathExtent, MagickTrue, _CubeInfo::maximum_colors, NoDitherMethod, _QuantizeInfo::number_colors, PerceptibleReciprocal(), _Image::progress_monitor, QuantumRange, QuantumScale, QueryColorCompliance(), random_info, RandomColorComponent, _PixelInfo::red, _KmeansInfo::red, ReduceImageColors(), ResourceLimitError, _Image::rows, SetImageColormap(), SetImageProgress(), SetImageProperty(), SetPixelIndex(), _ExceptionInfo::signature, _Image::signature, SyncCacheViewAuthenticPixels(), SyncImage(), ThreadResource, ThrowBinaryException, TraceEvent, and UndefinedPixelTrait.
|
inlinestatic |
Definition at line 2422 of file quantize.c.
References CMYKColorspace, GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelGreen(), GetPixelRed(), IsHueCompatibleColorspace(), MagickFalse, OpaqueAlpha, QuantumRange, QuantumScale, and UndefinedPixelTrait.
Referenced by KmeansImage().
|
inlinestatic |
Definition at line 2818 of file quantize.c.
MagickExport MagickBooleanType PosterizeImage | ( | Image * | image, |
const size_t | levels, | ||
const DitherMethod | dither_method, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 2828 of file quantize.c.
References AcquireAuthenticCacheView(), AcquireQuantizeInfo(), _PixelInfo::alpha, _Image::alpha_trait, _PixelInfo::blue, CMYKColorspace, _Image::colormap, _Image::colors, _Image::colorspace, _Image::columns, DestroyCacheView(), DestroyQuantizeInfo(), _QuantizeInfo::dither_method, _Image::filename, GetCacheViewAuthenticPixels(), GetMagickModule, GetPixelAlpha(), GetPixelAlphaTraits(), GetPixelBlack(), GetPixelBlackTraits(), GetPixelBlue(), GetPixelBlueTraits(), GetPixelChannels(), GetPixelGreen(), GetPixelGreenTraits(), GetPixelRed(), GetPixelRedTraits(), _PixelInfo::green, IsEventLogging(), 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, UndefinedPixelTrait, and UpdatePixelTrait.
Definition at line 2976 of file quantize.c.
References _DoublePixelPacket::alpha, _CubeInfo::associate_alpha, _DoublePixelPacket::blue, _NodeInfo::child, _DoublePixelPacket::green, _NodeInfo::id, MagickFalse, _CubeInfo::maximum_colors, _CubeInfo::nodes, _NodeInfo::number_unique, _NodeInfo::parent, PruneChild(), _DoublePixelPacket::red, and _NodeInfo::total_color.
Referenced by PruneChild(), PruneLevel(), PruneToCubeDepth(), and Reduce().
Definition at line 3035 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::depth, _NodeInfo::level, MagickFalse, PruneChild(), and PruneLevel().
Referenced by ClassifyImageColors(), and PruneLevel().
Definition at line 3080 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::depth, _NodeInfo::level, MagickFalse, PruneChild(), and PruneToCubeDepth().
Referenced by ClassifyImageColors(), and PruneToCubeDepth().
|
static |
Definition at line 3509 of file quantize.c.
References MagickEpsilon.
Referenced by ReduceImageColors().
|
static |
Definition at line 3378 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, MagickFalse, _CubeInfo::nodes, _NodeInfo::quantize_error, and QuantizeErrorFlatten().
Referenced by QuantizeErrorFlatten(), and ReduceImageColors().
MagickExport MagickBooleanType QuantizeImage | ( | const QuantizeInfo * | quantize_info, |
Image * | image, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 3129 of file quantize.c.
References _Image::alpha_trait, AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, DestroyCubeInfo(), _QuantizeInfo::dither_method, _Image::filename, GetCubeInfo(), GetMagickModule, IdentifyImageGray(), IsEventLogging(), IsGrayImageType(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxColormapSize, _CubeInfo::maximum_colors, MaxTreeDepth, NoDitherMethod, _QuantizeInfo::number_colors, ReduceImageColors(), ResourceLimitError, SetGrayscaleImage(), _ExceptionInfo::signature, _Image::signature, _QuantizeInfo::signature, ThrowBinaryException, TraceEvent, _QuantizeInfo::tree_depth, and UndefinedPixelTrait.
Referenced by CompressImageColormap(), PosterizeImage(), PreviewImage(), QuantizeImages(), and SetImageType().
MagickExport MagickBooleanType QuantizeImages | ( | const QuantizeInfo * | quantize_info, |
Image * | images, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 3231 of file quantize.c.
References AssignImageColors(), AssignImageTag, ClassifyImageColors(), _Image::client_data, DestroyCubeInfo(), _QuantizeInfo::dither_method, _Image::filename, GetCubeInfo(), GetImageListLength(), GetMagickModule, GetNextImageInList(), IsEventLogging(), 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().
Definition at line 3425 of file quantize.c.
References _CubeInfo::associate_alpha, _NodeInfo::child, _CubeInfo::colors, MagickFalse, _CubeInfo::next_threshold, _NodeInfo::number_unique, PruneChild(), _CubeInfo::pruning_threshold, _NodeInfo::quantize_error, and Reduce().
Referenced by Reduce(), and ReduceImageColors().
Definition at line 3524 of file quantize.c.
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 KmeansImage(), QuantizeImage(), and QuantizeImages().
MagickExport MagickBooleanType RemapImage | ( | const QuantizeInfo * | quantize_info, |
Image * | image, | ||
const Image * | remap_image, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 3604 of file quantize.c.
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, DestroyCubeInfo(), _Image::filename, GetCubeInfo(), GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, ResourceLimitError, _ExceptionInfo::signature, _Image::signature, ThrowBinaryException, and TraceEvent.
MagickExport MagickBooleanType RemapImages | ( | const QuantizeInfo * | quantize_info, |
Image * | images, | ||
const Image * | remap_image, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 3672 of file quantize.c.
References AssignImageColors(), ClassifyImageColors(), _CubeInfo::colors, DestroyCubeInfo(), _Image::filename, GetCubeInfo(), GetMagickModule, GetNextImageInList(), IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MaxTreeDepth, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, QuantizeImages(), ResourceLimitError, _ExceptionInfo::signature, _Image::signature, ThrowBinaryException, and TraceEvent.
|
static |
Definition at line 1795 of file quantize.c.
References EastGravity, MagickFalse, MagickTrue, NorthGravity, Riemersma(), RiemersmaDither(), SouthGravity, and WestGravity.
Referenced by DitherImage(), and Riemersma().
|
static |
Definition at line 1672 of file quantize.c.
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::diffusion, _CubeInfo::distance, DitherImageTag, EastGravity, _CubeInfo::error, ErrorQueueLength, ErrorRelativeWeight, 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().
Definition at line 738 of file quantize.c.
References _Image::alpha_trait, _CubeInfo::associate_alpha, _QuantizeInfo::colorspace, GRAYColorspace, LinearGRAYColorspace, MagickFalse, MagickTrue, _QuantizeInfo::number_colors, _CubeInfo::quantize_info, and UndefinedPixelTrait.
Referenced by ClassifyImageColors().
static MagickBooleanType SetGrayscaleImage | ( | Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 3780 of file quantize.c.
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, SetImageMonochrome(), SetPixelIndex(), _Image::signature, _Image::storage_class, SyncCacheViewAuthenticPixels(), ThrowBinaryException, TransformImageColorspace(), and _Image::type.
Referenced by QuantizeImage().
MagickBooleanType SetImageColormap | ( | Image * | image, |
CubeInfo * | cube_info, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 3970 of file quantize.c.
References AcquireImageColormap(), _Image::colormap, _CubeInfo::colors, _Image::colors, DefineImageColormap(), _Image::filename, MagickFalse, MagickMax, MagickTrue, _CubeInfo::maximum_colors, ResizeQuantumMemory(), ResourceLimitError, _CubeInfo::root, and ThrowBinaryException.
Referenced by AssignImageColors(), and KmeansImage().