colour.read_LUT

colour.read_LUT(path, method=None, **kwargs)[source]

Reads given LUT file using given method.

Parameters:
  • path (unicode) – LUT path.
  • method (unicode, optional) – {None, ‘Cinespace’, ‘Iridas Cube’, ‘Resolve Cube’, ‘Sony SPI1D’, ‘Sony SPI3D’}, Reading method, if None, the method will be auto-detected according to extension.
Returns:

LUT1D, LUT3x1D or LUT3D class instance.

Return type:

LUT1D or LUT3x1D or LUT3D

References

[AdobeSystems2013b], [Chamberlain2015], [RisingSunResearch]

Examples

Reading a 3x1D Iridas .cube LUT:

>>> path = os.path.join(
...     os.path.dirname(__file__), 'tests', 'resources', 'iridas_cube',
...     'ACES_Proxy_10_to_ACES.cube')
>>> print(read_LUT(path))
LUT3x1D - ACES Proxy 10 to ACES
-------------------------------
<BLANKLINE>
Dimensions : 2
Domain     : [[ 0.  0.  0.]
              [ 1.  1.  1.]]
Size       : (32, 3)

Reading a 1D Sony .spi1d LUT:

>>> path = os.path.join(
...     os.path.dirname(__file__), 'tests', 'resources', 'sony_spi1d',
...     'eotf_sRGB_1D.spi1d')
>>> print(read_LUT(path))
LUT1D - eotf sRGB 1D
--------------------
<BLANKLINE>
Dimensions : 1
Domain     : [-0.1  1.5]
Size       : (16,)
Comment 01 : Generated by "Colour 0.3.11".
Comment 02 : "colour.models.eotf_sRGB".

Reading a 3D Sony .spi3d LUT:

>>> path = os.path.join(
...     os.path.dirname(__file__), 'tests', 'resources', 'sony_spi3d',
...     'Colour_Correct.spi3d')
>>> print(read_LUT(path))
LUT3D - Colour Correct
----------------------
<BLANKLINE>
Dimensions : 3
Domain     : [[ 0.  0.  0.]
              [ 1.  1.  1.]]
Size       : (4, 4, 4, 3)
Comment 01 : Adapted from a LUT generated by Foundry::LUT.