#Read the slides before attempting to run!
#You'll need to install pillow for this to work
from PIL import Image, ImageFilter

img = Image.open("willow.jpg") # Replace with your own image!

small = img.crop([100, 100, 700, 700])

small = small.resize([200, 200])
squareSize = 200

gridSize = 15
mosaic = Image.new("RGB", [squareSize*gridSize, squareSize*gridSize])

for row in range(gridSize):
    for col in range(gridSize):
        if (row + col) % 2 == 0:
            mosaic.paste(small, [row * squareSize, col * squareSize])
        else:
            mosaic.paste(small.filter(filter=ImageFilter.CONTOUR), [row * squareSize, col * squareSize])


mosaic.show()