colour.io.write_image_Imageio#

colour.io.write_image_Imageio(image: ArrayLike, path: str, bit_depth: Literal['uint8', 'uint16', 'float16', 'float32', 'float64', 'float128'] = 'float32', **kwargs: Any) Optional[bytes][source]#

Write given image data at given path using Imageio.

Parameters:
  • image (ArrayLike) – Image data.

  • path (str) – Image path.

  • bit_depth (Literal['uint8', 'uint16', 'float16', 'float32', 'float64', 'float128']) – Bit depth to write the image at, the image data is converted with colour.io.convert_bit_depth() definition prior to writing the image.

  • kwargs (Any) – Keywords arguments.

Returns:

Definition success.

Return type:

bool

Notes

Examples

>>> import os
>>> import colour
>>> path = os.path.join(
...     colour.__path__[0],
...     "io",
...     "tests",
...     "resources",
...     "CMS_Test_Pattern.exr",
... )
>>> image = read_image(path)  
>>> path = os.path.join(
...     colour.__path__[0],
...     "io",
...     "tests",
...     "resources",
...     "CMSTestPattern.tif",
... )
>>> write_image_Imageio(image, path)  
True