A very blunt attempt - slice the image in blocks, determine normalized color as a mean of all pixels colors ( pixels that are closer to the block center have more "weight" in result ), then paint entire rectangle with new color. Supports arbitrary shape of blocks.
ChunkyImagePixelizer.pixelize_image("input.png", "output.png", :width => 10, :height => 10)