Input and Output#

Image Data#

colour

READ_IMAGE_METHODS

Supported image read methods.

read_image(path[, bit_depth, method])

Read the image data at given path using given method.

WRITE_IMAGE_METHODS

Supported image write methods.

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

Write given image data at given path using given method.

Ancillary Objects

colour.io

ImageAttribute_Specification(name, value, type_)

Define an image specification attribute.

convert_bit_depth(a[, bit_depth])

Convert given array to given bit-depth, the current bit-depth of the array is used to determine the appropriate conversion path.

read_image_OpenImageIO(path[, bit_depth, ...])

Read the image data at given path using OpenImageIO.

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

Write given image data at given path using OpenImageIO.

read_image_Imageio(path[, bit_depth])

Read the image data at given path using Imageio.

write_image_Imageio(image, path[, bit_depth])

Write given image data at given path using Imageio.

as_3_channels_image(a)

Convert given array \(a\) to a 3-channels image-like representation.

OpenColorIO Processing#

colour.io

process_image_OpenColorIO(a, *args, **kwargs)

Process given image data with OpenColorIO.

Look Up Table (LUT) Data#

colour

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

Define the base class for a 1D LUT.

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

Define the base class for a 3x1D LUT.

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

Define the base class for a 3D LUT.

LUTOperatorMatrix([matrix, offset])

Define the LUT operator supporting a 3x3 or 4x4 matrix and an offset vector.

LUTSequence(*args)

Define the base class for a LUT sequence, i.e. a series of LUTs, LUT operators or objects implementing the colour.hints.ProtocolLUTSequenceItem protocol.

read_LUT(path[, method])

Read given LUT file using given method.

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

Write given LUT to given file using given method.

Ancillary Objects

colour.io

AbstractLUTSequenceOperator([name, comments])

Define the base class for LUT sequence operators.

LUT_to_LUT(LUT, cls[, force_conversion])

Convert given LUT to given cls class instance.

read_LUT_Cinespace(path)

Read given Cinespace .csp LUT file.

write_LUT_Cinespace(LUT, path[, decimals])

Write given LUT to given Cinespace .csp LUT file.

read_LUT_IridasCube(path)

Read given Iridas .cube LUT file.

write_LUT_IridasCube(LUT, path[, decimals])

Write given LUT to given Iridas .cube LUT file.

read_LUT_SonySPI1D(path)

Read given Sony .spi1d LUT file.

write_LUT_SonySPI1D(LUT, path[, decimals])

Write given LUT to given Sony .spi1d LUT file.

read_LUT_SonySPI3D(path)

Read given Sony .spi3d LUT file.

write_LUT_SonySPI3D(LUT, path[, decimals])

Write given LUT to given Sony .spi3d LUT file.

CSV Tabular Data#

colour

read_sds_from_csv_file(path, **kwargs)

Read the spectral data from given CSV file and returns its content as a dict of colour.SpectralDistribution class instances.

read_spectral_data_from_csv_file(path, **kwargs)

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

write_sds_to_csv_file(sds, path)

Write the given spectral distributions to given CSV file.

IES TM-27-14 Data#

colour

SpectralDistribution_IESTM2714([path, ...])

Define a IES TM-27-14 spectral distribution.

UPRTek and Sekonic Spectral Data#

colour

SpectralDistribution_UPRTek(path, **kwargs)

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

SpectralDistribution_Sekonic(path, **kwargs)

Implement support to read and write IES TM-27-14 spectral data XML file from a Sekonic CSV file.

X-Rite Data#

colour

read_sds_from_xrite_file(path)

Read the spectral data from given X-Rite file and returns it as a dict of colour.SpectralDistribution class instances.