Input and Output (IO)#

Image IO#

colour

read_image(path[, bit_depth, method])

Read image data from the specified path.

READ_IMAGE_METHODS

Supported image reading methods.

write_image(image, path[, bit_depth, method])

Write image data to the specified path.

WRITE_IMAGE_METHODS

Supported image writing methods.

Ancillary Objects

colour.io

as_3_channels_image(a)

Convert the specified array \(a\) to a 3-channel image-like representation.

convert_bit_depth(a[, bit_depth])

Convert the specified array to the specified bit-depth.

Image_Specification_Attribute(name, value, type_)

Define an image specification attribute for OpenImageIO operations.

image_specification_OpenImageIO(width, ...)

Create an OpenImageIO image specification.

MAPPING_BIT_DEPTH

Represent a delimiter and case-insensitive dict-like object supporting both slug keys (SEO-friendly, human-readable versions with delimiters) and canonical keys (slugified keys without delimiters).

read_image_Imageio(path[, bit_depth])

Read image data from the specified path using Imageio.

read_image_OpenImageIO(-> Tuple[NDArrayReal, ...)

Read image data from the specified path using OpenImageIO.

write_image_Imageio(image, path[, bit_depth])

Write image data to the specified path using Imageio.

write_image_OpenImageIO(image, path[, ...])

Write image data to the specified path using OpenImageIO.

Spectral Image - Fichet et al. (2021)#

colour

read_spectral_image_Fichet2021(...)

Read the Fichet et al. (2021) spectral image at the specified path using OpenImageIO.

Specification_Fichet2021(path, components, ...)

Define the Fichet et al. (2021) spectral image specification.

write_spectral_image_Fichet2021(components, path)

Write the specified Fichet et al. (2021) components to the specified path using OpenImageIO.

Ancillary Objects

colour.io

ComponentsFichet2021

sd_to_spectrum_attribute_Fichet2021(sd[, ...])

Convert the specified spectral distribution to a spectrum attribute value according to Fichet et al. (2021).

spectrum_attribute_to_sd_Fichet2021(...)

Convert the specified spectrum attribute value to a spectral distribution according to Fichet et al. (2021).

OpenColorIO Processing#

colour.io

process_image_OpenColorIO(a, *args, **kwargs)

Process the specified image data with OpenColorIO.

Look Up Table (LUT) Data#

colour

LUT1D([table, name, domain, size, comments])

Define the base class for a 1D LUT.

LUT3D([table, name, domain, size, comments])

Define the base class for a 3-dimensional lookup table (3D LUT).

LUT3x1D([table, name, domain, size, comments])

Define the base class for a 3x1D LUT.

LUTOperatorMatrix([matrix, offset])

Define the LUT operator that applies matrix transformations and offset vectors for colour space conversions.

LUTSequence(*args)

Define the base class for a LUT sequence.

read_LUT(path[, method])

Read the specified LUT file.

write_LUT(LUT, path[, decimals, method])

Write the specified LUT to the specified file.

Ancillary Objects

colour.io

AbstractLUTSequenceOperator([name, comments])

Define the base class for LUT sequence operators.

LUT_to_LUT(LUT, cls[, force_conversion])

Convert a specified LUT to the specified cls class instance.

read_LUT_Cinespace(path)

Read the specified Cinespace .csp LUT file.

read_LUT_IridasCube(path)

Read the specified Iridas .cube LUT file.

read_LUT_SonySPI1D(path)

Read the specified Sony .spi1d LUT file.

read_LUT_SonySPI3D(path)

Read the specified Sony .spi3d LUT file.

write_LUT_Cinespace(LUT, path[, decimals])

Write the specified LUT to the specified Cinespace .csp LUT file.

write_LUT_IridasCube(LUT, path[, decimals])

Write the specified LUT to the specified Iridas .cube LUT file.

write_LUT_SonySPI1D(LUT, path[, decimals])

Write the specified LUT to the specified Sony .spi1d LUT file.

write_LUT_SonySPI3D(LUT, path[, decimals])

Write the specified LUT to the specified Sony .spi3d LUT file.

CSV Tabular Data#

colour

read_sds_from_csv_file(path, **kwargs)

Read spectral data from the specified CSV file and convert its content to a dict of colour.SpectralDistribution class instances.

read_spectral_data_from_csv_file(path, **kwargs)

Read spectral data from the specified CSV file in the following form.

write_sds_to_csv_file(sds, path)

Write spectral distributions to a CSV file.

IES TM-27-14 Data#

colour

SpectralDistribution_IESTM2714([path, ...])

Define an IES TM-27-14 spectral distribution for electronic transfer of spectral data.

UPRTek and Sekonic Spectral Data#

colour

SpectralDistribution_Sekonic(path, **kwargs)

Provide support for reading and writing IES TM-27-14 spectral data XML files from Sekonic CSV files.

SpectralDistribution_UPRTek(path, **kwargs)

Implement support to read and write IES TM-27-14 spectral data XML files from UPRTek Pseudo-XLS files.

X-Rite Data#

colour

read_sds_from_xrite_file(path)

Read spectral data from the specified X-Rite file and convert it to a dict of colour.SpectralDistribution class instances.