I need to pixelate the image I created the grid after setting the color for the pixel corners I need to average the new pixel colors by using drawrectfilled
def pixalate_image( ):
image_obj = makePicture( pickAFile( ))
pixel = requestInteger( "Get distance to pixel block:" )
w = getWidth( image_obj )
h = getHeight( image_obj )
for w_idx in range( 0, w, pixel):
for h_idx in range( 0, h , pixel):
setColor( getPixel( image_obj, w_idx, h_idx ), white )
show( image_obj )
pixalate_image()