def calculate_ratio(start, overlay):
    """
    Calculates the ratio to be used when resizing the logo and white background.
    Also need the ratio to maintain proper aspect ratio of the logo.
    """
    factor = 5 if start.size[0] > start.size[1] else 3.75
    overlay_new_width = int(start.size[0] / factor)
    ratio = overlay_new_width / overlay.size[0]
    return ratio