def downsize_image(image, n):
    """
    Downsizes an image by selecting every n pixel, it might be possible to
    resize to an arbitary resolution, but I didn't want to deal with
    interpolation and strange behaviour with semi-transparent pixels.
    """
    return image[::n, ::n]