Joseph Drackey

Generation

generate functionWed, 29 Mar 2023

Define a function named posterize. This function expects an image and a tuple of RGB values as arguments.

def posterize(image, rgb): for p in getPixels(image): setRed(p, rgb[0]) setGreen(p, rgb[1]) setBlue(p, rgb[2])

Questions about programming?Chat with your personal AI assistant