# imageio.plugins.opencv.OpenCVPlugin.properties

OpenCVPlugin.properties(index: int = None, colorspace: int | str = None, flags: int = cv2.IMREAD_COLOR) → ImageProperties

  Standardized image metadata.

  Parameters:
    index int, Ellipsis

      If int, get the properties of the index-th image in the ImageResource. If `...`, get the properties of the image stack that contains all images. If None (default), use `index=0` if the image contains exactly one image and `index=...` otherwise.

    colorspace str, int

      The colorspace to convert into after loading and before returning the image. If None (default) keep grayscale images as is, convert images with an alpha channel to `RGBA` and all other images to `RGB`. If int, interpret `colorspace` as one of OpenCVs conversion flags and use it for conversion. If str, convert the image into the given colorspace. Possible string values are: `"RGB"`, `"BGR"`, `"RGBA"`, `"BGRA"`, `"GRAY"`, `"HSV"`, or `"LAB"`.

    flags int

      The OpenCV flag(s) to pass to the reader. Refer to the OpenCV docs for details.

  Returns:
    props ImageProperties

      A dataclass filled with standardized image metadata.

  Notes

  Reading properties with OpenCV involves decoding pixel data, because OpenCV doesn’t provide a direct way to access metadata.

previous

imageio.plugins.opencv.OpenCVPlugin.write

next

imageio.plugins.opencv.OpenCVPlugin.metadata