Click or drag to resize
Accord.NET (logo)

ColorImageQuantizerUseCaching Property

Use color caching during color reduction or not.

Namespace:  Accord.Imaging.ColorReduction
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax
public bool UseCaching { get; set; }
Request Example View Source

Property Value

Type: Boolean
Remarks

The property has effect only for methods like ReduceColors(Bitmap, Int32) and specifies if internal cache of already processed colors should be used or not. For each pixel in the original image the color reduction routine does search in target color palette to find the best matching color. To avoid doing the search again and again for already processed colors, the class may use internal dictionary which maps colors of original image to indexes in target color palette.

Note Note
The property provides a trade off. On one hand it may speedup color reduction routine, but on another hand it increases memory usage. Also cache usage may not be efficient for very small target color tables.

Default value is set to .

See Also