colour.write_spectral_image_Fichet2021#
- colour.write_spectral_image_Fichet2021(components: Sequence[SpectralDistribution | MultiSpectralDistributions] | SpectralDistribution | MultiSpectralDistributions | ComponentsFichet2021 | ValuesView, path: str | PathLike, bit_depth: Literal['float16', 'float32'] = 'float32', specification: Specification_Fichet2021 = SPECIFICATION_FICHET2021_DEFAULT, components_to_RGB_callable: Callable = components_to_sRGB_Fichet2021, **kwargs: Any) bool[source]#
Write the specified Fichet et al. (2021) components to the specified path using OpenImageIO.
- Parameters:
components (Sequence[SpectralDistribution | MultiSpectralDistributions] | SpectralDistribution | MultiSpectralDistributions | ComponentsFichet2021 | ValuesView) – 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.
kwargs (Any)
- 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