Image.quantize

Analyzes the colors within a reference image and chooses a fixed number of colors to represent the image. The goal of the algorithm is to minimize the difference between the input and output image while minimizing the processing time.

class Image
void
quantize
(
bool measureError = false
)

Parameters

measureError bool

Set to true to calculate quantization errors when quantizing the image. These can be accessed with: normalizedMeanError, normalizedMaxError and meanErrorPerPixel.

Meta