@_with_element
def image(self, element, image, caption=None, width=None, use_column_width=False, clamp=False, channels='RGB', format='JPEG'):
    "Display an image or list of images.\n\n        Parameters\n        ----------\n        image : numpy.ndarray, [numpy.ndarray], BytesIO, str, or [str]\n            Monochrome image of shape (w,h) or (w,h,1)\n            OR a color image of shape (w,h,3)\n            OR an RGBA image of shape (w,h,4)\n            OR a URL to fetch the image from\n            OR a list of one of the above, to display multiple images.\n        caption : str or list of str\n            Image caption. If displaying multiple images, caption should be a\n            list of captions (one for each image).\n        width : int or None\n            Image width. None means use the image width.\n        use_column_width : bool\n            If True, set the image width to the column width. This takes\n            precedence over the `width` parameter.\n        clamp : bool\n            Clamp image pixel values to a valid range ([0-255] per channel).\n            This is only meaningful for byte array images; the parameter is\n            ignored for image URLs. If this is not set, and an image has an\n            out-of-range value, an error will be thrown.\n        channels : 'RGB' or 'BGR'\n            If image is an nd.array, this parameter denotes the format used to\n            represent color information. Defaults to 'RGB', meaning\n            `image[:, :, 0]` is the red channel, `image[:, :, 1]` is green, and\n            `image[:, :, 2]` is blue. For images coming from libraries like\n            OpenCV you should set this to 'BGR', instead.\n        format : 'JPEG' or 'PNG'\n            This parameter specifies the image format to use when transferring\n            the image data. Defaults to 'JPEG'.\n\n        Example\n        -------\n        >>> from PIL import Image\n        >>> image = Image.open('sunrise.jpg')\n        >>>\n        >>> st.image(image, caption='Sunrise by the mountains',\n        ...          use_column_width=True)\n\n        .. output::\n           https://share.streamlit.io/0.25.0-2JkNY/index.html?id=YCFaqPgmgpEz7jwE4tHAzY\n           height: 630px\n\n        "
    from .elements import image_proto
    if use_column_width:
        width = (- 2)
    elif (width is None):
        width = (- 1)
    elif (width <= 0):
        raise StreamlitAPIException('Image width must be positive.')
    image_proto.marshall_images(self._get_coordinates(), image, caption, width, element.imgs, clamp, channels, format)
Display an image or list of images.

Parameters
----------
image : numpy.ndarray, [numpy.ndarray], BytesIO, str, or [str]
    Monochrome image of shape (w,h) or (w,h,1)
    OR a color image of shape (w,h,3)
    OR an RGBA image of shape (w,h,4)
    OR a URL to fetch the image from
    OR a list of one of the above, to display multiple images.
caption : str or list of str
    Image caption. If displaying multiple images, caption should be a
    list of captions (one for each image).
width : int or None
    Image width. None means use the image width.
use_column_width : bool
    If True, set the image width to the column width. This takes
    precedence over the `width` parameter.
clamp : bool
    Clamp image pixel values to a valid range ([0-255] per channel).
    This is only meaningful for byte array images; the parameter is
    ignored for image URLs. If this is not set, and an image has an
    out-of-range value, an error will be thrown.
channels : 'RGB' or 'BGR'
    If image is an nd.array, this parameter denotes the format used to
    represent color information. Defaults to 'RGB', meaning
    `image[:, :, 0]` is the red channel, `image[:, :, 1]` is green, and
    `image[:, :, 2]` is blue. For images coming from libraries like
    OpenCV you should set this to 'BGR', instead.
format : 'JPEG' or 'PNG'
    This parameter specifies the image format to use when transferring
    the image data. Defaults to 'JPEG'.

Example
-------
>>> from PIL import Image
>>> image = Image.open('sunrise.jpg')
>>>
>>> st.image(image, caption='Sunrise by the mountains',
...          use_column_width=True)

.. output::
   https://share.streamlit.io/0.25.0-2JkNY/index.html?id=YCFaqPgmgpEz7jwE4tHAzY
   height: 630px
@_with_element
def image(self, element, image, caption=None, width=None, use_column_width=False, clamp=False, channels='RGB', format='JPEG'):
    "Display an image or list of images.\n\n        Parameters\n        ----------\n        image : numpy.ndarray, [numpy.ndarray], BytesIO, str, or [str]\n            Monochrome image of shape (w,h) or (w,h,1)\n            OR a color image of shape (w,h,3)\n            OR an RGBA image of shape (w,h,4)\n            OR a URL to fetch the image from\n            OR a list of one of the above, to display multiple images.\n        caption : str or list of str\n            Image caption. If displaying multiple images, caption should be a\n            list of captions (one for each image).\n        width : int or None\n            Image width. None means use the image width.\n        use_column_width : bool\n            If True, set the image width to the column width. This takes\n            precedence over the `width` parameter.\n        clamp : bool\n            Clamp image pixel values to a valid range ([0-255] per channel).\n            This is only meaningful for byte array images; the parameter is\n            ignored for image URLs. If this is not set, and an image has an\n            out-of-range value, an error will be thrown.\n        channels : 'RGB' or 'BGR'\n            If image is an nd.array, this parameter denotes the format used to\n            represent color information. Defaults to 'RGB', meaning\n            `image[:, :, 0]` is the red channel, `image[:, :, 1]` is green, and\n            `image[:, :, 2]` is blue. For images coming from libraries like\n            OpenCV you should set this to 'BGR', instead.\n        format : 'JPEG' or 'PNG'\n            This parameter specifies the image format to use when transferring\n            the image data. Defaults to 'JPEG'.\n\n        Example\n        -------\n        >>> from PIL import Image\n        >>> image = Image.open('sunrise.jpg')\n        >>>\n        >>> st.image(image, caption='Sunrise by the mountains',\n        ...          use_column_width=True)\n\n        .. output::\n           https://share.streamlit.io/0.25.0-2JkNY/index.html?id=YCFaqPgmgpEz7jwE4tHAzY\n           height: 630px\n\n        "
    from .elements import image_proto
    if use_column_width:
        width = (- 2)
    elif (width is None):
        width = (- 1)
    elif (width <= 0):
        raise StreamlitAPIException('Image width must be positive.')
    image_proto.marshall_images(self._get_coordinates(), image, caption, width, element.imgs, clamp, channels, format)