def get_resize_dimensions(original_size, dimensions):
    """
    Gets the ideal resize dimensions given the original size.
    :param original_size: Original size.
    :param dimensions: Default target dimensions.
    :return: Ideal dimensions.
    """
    dim_x, dim_y = dimensions
    img_x, img_y = original_size
    if img_x >= img_y:
        return int(dim_x), int(img_y * (dim_x / (img_x * 1.0)))
    else:
        return int(img_x * (dim_y / (img_y * 1.0))), int(dim_y)