I currently am writing an application that draws a screen with cells (drawn as line()s) to a fit a grid (100x100 grid of 4x4 squares). How would I go about converting an image into a rect()s that fit into my grid? Essentially downsampling the image. I assume you would load the pixels of the image you're going to draw, loop through the pixels, take the color from the it's place in the image and draw a grid of rectangles.
1