quantize
Quantize the colors in a ImageBitmap to a maximum of maxColors colors.
Return
A map of colors to their frequency in the image.
Parameters
image
the ImageBitmap to extract colors from.
maxColors
The number of colors to divide the image into. A lower number of colors may be returned.