Reduce the number of colors in img to the colors used by reference.
If a dither method is set then the given colors are dithered over
the image as necessary, otherwise the closest color
(in RGB colorspace) is selected to replace that pixel in the image.
Reduce the number of colors in img to the colors used by reference. If a dither method is set then the given colors are dithered over the image as necessary, otherwise the closest color (in RGB colorspace) is selected to replace that pixel in the image.