colour.write_spectral_image_Fichet2021#
- colour.write_spectral_image_Fichet2021(components: Sequence[SpectralDistribution | MultiSpectralDistributions] | SpectralDistribution | MultiSpectralDistributions | Dict[str | float, Tuple[ndarray[Any, dtype[float16 | float32 | float64]], ndarray[Any, dtype[float16 | float32 | float64]]]], path: str | Path, bit_depth: Literal['float16', 'float32'] = 'float32', specification: Specification_Fichet2021 = Specification_Fichet2021(), components_to_RGB_callable: Callable = components_to_sRGB_Fichet2021, **kwargs)[source]#
Write given Fichet et al. (2021) components to given path using OpenImageIO.
- Parameters:
components (Sequence[SpectralDistribution | MultiSpectralDistributions] | SpectralDistribution | MultiSpectralDistributions | Dict[str | float, Tuple[ndarray[Any, dtype[float16 | float32 | float64]], ndarray[Any, dtype[float16 | float32 | float64]]]]) – Fichet et al. (2021) components.
bit_depth (Literal['float16', 'float32']) – Bit-depth to write the image at, the bit-depth conversion behaviour is ruled directly by OpenImageIO.
specification (Specification_Fichet2021) – Fichet et al. (2021) spectral image specification.
components_to_RGB_callable (Callable) – Callable converting the components to a preview RGB image.
shape – Optional shape the Fichet et al. (2021) components should take: Used when converting spectral distributions of a colour rendition chart to create a rectangular image rather than a single line of values.
- Returns:
Definition success.
- Return type:
Examples
>>> import os >>> import colour >>> path = os.path.join( ... colour.__path__[0], ... "io", ... "tests", ... "resources", ... "BabelColorAverage.exr", ... ) >>> msds = list(colour.SDS_COLOURCHECKERS["BabelColor Average"].values()) >>> specification = Specification_Fichet2021(is_emissive=False) >>> write_spectral_image_Fichet2021( ... msds, ... path, ... "float16", ... specification, ... shape=(4, 6, len(msds[0].shape.wavelengths)), ... ) True