OctreeQuantizer Class

Namespace:
Weavy.Core.Imaging
Assembly:
Weavy.Core.dll

Quantize using an Octree

public class OctreeQuantizer : Quantizer
Inheritance:
System.Object → QuantizerOctreeQuantizer

Constructors

OctreeQuantizer(Int32, Int32) Construct the octree quantizer

Fields

_dither
DitherMatrix a Floyd-Steinberg dither matrix new float[,] {{0,0,0}, {0,0,0.44f}, {0.19f,0.31f,0.06f}};
DitherPercent

Properties

Dither Uses a Floyd-Steinberg dither

Methods

GetPalette(ColorPalette) Retrieve the palette for the quantized image
InitialQuantizePixel(Quantizer.Color32) Process the pixel in the first pass of the algorithm
QuantizePixel(Quantizer.Color32) Override this to process the pixel in the second pass of the algorithm
Reset() Clears the octree
Reset(int, int) Clears the octree and reconfigures color settings

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(object, Formatting?, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.