from PIL import Image def shrink( original, palette ) : ''' returns a new image where colors from the original are replaced with their closest palette correspondents ''' pass def closest( pixel, palette ) : ''' Returns the color in palette closest to pixel ''' pass def euclidean( c1, c2 ) : ''' returns the euclidean distance between c1 and c2 ''' pass if ( __name__ == '__main__') : import shrink_tester shrink_tester.test_shrink()