colour.io.write_image_Imageio#
- colour.io.write_image_Imageio(image: ArrayLike, path: str | Path, bit_depth: Literal['uint8', 'uint16', 'float16', 'float32', 'float64', 'float128'] = 'float32', **kwargs: Any) bytes | None [source]#
Write given image data at given path using Imageio.
- Parameters:
image (ArrayLike) – Image data.
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:
Notes
It is possible to control how the image are saved by the Freeimage backend by using the
flags
keyword argument and passing a desired value. See the Load / Save flag constants section in https://sourceforge.net/p/freeimage/svn/HEAD/tree/FreeImage/trunk/Source/FreeImage.h
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