I have a simple function that processes images. It sets all the specific-sized boxes in an image to their average color (example). The code works fine when implemented not c