Module quant

Source
Expand description

Types and methods for handling color map operations.

Structs§

Box0
Represents a box of ColorMap pixels.
BoxVector
Represents a list of Box0.
ColorMap
Represents a map of colors and pixels.
PaletteConfig
Groups palette configuration settings together.
TupleInt
Variable-length container of ColorMap Samples.

Enums§

BuiltinDither
Built-in dither
LookupFunction
Matching enum for comparing a selected lookup function.
MethodForDiffuse
Method for diffusing
MethodForLargest
Method for finding the largest dimension for splitting, and sorting by that component.
MethodForRep
Method for choosing a color from the box
MethodForResampling
Method used for resampling
QualityMode
Quality modes

Constants§

PALETTE_MAX
Maximum number of palette items.

Functions§

compare_plane
Sort TupleInt by item selected by the global_compare_plane parameter.
compute_hash
Compute a hash for a Histogram.
diffuse_atkinson
Atkinson’s Method
diffuse_burkes
Burkes’ Method
diffuse_fs
Floyd-Steinberg Method
diffuse_jajuni
Jarvis, Judice & Ninks Method
diffuse_none
No-op diffuse function.
diffuse_stucki
Stucki’s Method
error_diffuse
Diffuses error energy to surrounding pixels.
global_compare_plane
Gets the global comapre plane value.
largest_by_luminosity
Gets the largest value by its luminosity.
largest_by_norm
Gets the largest value by its normalized difference.
lookup_fast
Performs lookup for the closest color from palette using "fast" strategy.
lookup_mono_darkbg
Performs lookup for the closest color from mono dark background palette.
lookup_mono_lightbg
Performs lookup for the closest color from mono light background palette.
lookup_none
No-op lookup function
lookup_normal
Performs lookup for the closest color from palette using "normal" strategy.
set_global_compare_plane
Gets the global comapre plane value.
sum_compare
Sort BoxVector by sum.

Type Aliases§

Histogram
Histogram for ColorMap data.
Sample
Convenience alias for a palette sample.
Tuple
Convenience alias for a Sample list.