colour.io.read_image_Imageio#

colour.io.read_image_Imageio(path: str | Path, bit_depth: Literal['uint8', 'uint16', 'float16', 'float32', 'float64', 'float128'] = 'float32', **kwargs: Any) NDArrayReal[source]#

Read the image data at given path using Imageio.

Parameters:
  • path (str | Path) – Image path.

  • bit_depth (Literal['uint8', 'uint16', 'float16', 'float32', 'float64', 'float128']) – Returned image bit-depth, the image data is converted with colour.io.convert_bit_depth() definition after reading the image.

  • kwargs (Any) – Keywords arguments.

Returns:

Image data.

Return type:

class`numpy.ndarray`

Notes

  • For convenience, single channel images are squeezed to 2D arrays.

Examples

>>> import os
>>> import colour
>>> path = os.path.join(
...     colour.__path__[0],
...     "io",
...     "tests",
...     "resources",
...     "CMS_Test_Pattern.exr",
... )
>>> image = read_image_Imageio(path)
>>> image.shape  
(1267, 1274, 3)
>>> image.dtype
dtype('float32')