Uses K-means algorithm to reduce a picture to K colors.