func (Quantizer) Quantize(p color.Palette, m image.Image) color.Palette {
	n := cap(p) - len(p)
	qz := newQuantizer(m, n)
	if n > 1 {
		qz.cluster()  
	}
	return p[:len(p)+copy(p[len(p):cap(p)], qz.palette().ColorPalette())]
}
Quantize performs color quantization and returns a color.Palette.

Following the behavior documented with the draw.Quantizer interface,
"Quantize appends up to cap(p) - len(p) colors to p and returns the
updated palette...."  This method does not limit the number of colors
to 256.  Cap(p) or the quantity cap(p) - len(p) may be > 256.
Also for this method the value of the Quantizer object is ignored.
package mean
import (
	"image"
	"image/color"
	"image/draw"
	"math"
	"github.com/soniakeys/quant"
	"github.com/soniakeys/quant/internal"
)
type Quantizer int
var _ quant.Quantizer = Quantizer(0)
var _ draw.Quantizer = Quantizer(0)
func (q Quantizer) Paletted(img image.Image) *image.Paletted {
	n := int(q)
	if n > 256 {
		n = 256
	}
	qz := newQuantizer(img, n)
	if n > 1 {
		qz.cluster()  
	}
	return qz.paletted()  
}
func (q Quantizer) Palette(img image.Image) quant.Palette {
	qz := newQuantizer(img, int(q))
	if q > 1 {
		qz.cluster()  
	}
	return qz.palette()
}