def get_new_size_zoom(current_size, target_size):
    """
    Returns size (width, height) to scale image so
    smallest dimension fits target size.
    """
    scale_w = target_size[0] / current_size[0]
    scale_h = target_size[1] / current_size[1]
    scale_by = max(scale_w, scale_h)
    return (int(current_size[0] * scale_by), int(current_size[1] * scale_by))