(image, format, **params)
return stream.getvalue()
Return the given PIL `image` using `params`.

    :param image: the PIL image
    :type image: PIL.Image

    :param params: params to expand when calling PIL.Image.save()
    :type params: dict

    :return: the image formatted
    :rtype: bytes
Return the given PIL `image` using `params`.
Return the given PIL image using params .
def image_apply_opt(image, format, **params):
    """Return the given PIL `image` using `params`.

    :param image: the PIL image
    :type image: PIL.Image

    :param params: params to expand when calling PIL.Image.save()
    :type params: dict

    :return: the image formatted
    :rtype: bytes
    """
    stream = io.BytesIO()
    image.save(stream, format=format, **params)
    return stream.getvalue()
def image_apply_opt ( image , format , * * params ) : stream = io . BytesIO ( ) image . save ( stream , format = format , * * params ) return stream . getvalue ( )