def get_aspect_ratio(img):
    """ return the aspect ratio of given image
        ar = width//height
        return an int, we don't care about exact ratios
    """

    width, height = img.size

    aspect_ratio = width//height
    if aspect_ratio == 0:
        aspect_ratio = 1

    return aspect_ratio