colour.read_image¶
-
colour.
read_image
(path, bit_depth='float32', attributes=False)[source]¶ Reads given image using OpenImageIO.
Parameters: - path (unicode) – Image path.
- bit_depth (unicode, optional) – {‘float32’, ‘uint8’, ‘uint16’, ‘float16’}, Image bit_depth.
- attributes (bool, optional) – Whether to return the image attributes.
Returns: Image as a ndarray.
Return type: ndarray
Notes
- For convenience, single channel images are squeezed to 2d arrays.
Examples
>>> import os >>> path = os.path.join('tests', 'resources', 'CMSTestPattern.exr') >>> image = read_image(path) # doctest: +SKIP