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...