def _determine_dimensions(ideal_dimensions, current_dimensions):
    """
    ideal_dimensions: dimensions we want an image to fit into (width, height)
    current_dimensions: the dimensions the image currently has (width, height)
    returns the dimensions the image should be resized to
    """

    current_width = current_dimensions[0]
    current_height = current_dimensions[1]

    ideal_width = ideal_dimensions[0]
    ideal_height = ideal_dimensions[1]

    width_diff = current_width - ideal_width
    height_diff = current_height - ideal_height

    if (width_diff <= 0) and (height_diff <= 0):
        return current_dimensions

    if width_diff > height_diff:
        return ideal_width, int((ideal_width / current_width) * current_height)
    else:
        return int((ideal_height / current_height) * current_width), ideal_height