palettize

Verb

 * 1)  To encode (an image) efficiently by mapping its pixels to a palette containing only those colours that are actually present in the image.