colour.io.read_LUT_SonySPI1D

colour.io.read_LUT_SonySPI1D(path)[source]

Reads given Sony .spi1d LUT file.

Parameters:path (unicode) – LUT path.
Returns:LUT1D or LUT3x1D class instance.
Return type:LUT1D or LUT3x1D

Examples

Reading a 1D Sony .spi1d LUT:

>>> import os
>>> path = os.path.join(
...     os.path.dirname(__file__), 'tests', 'resources', 'sony_spi1d',
...     'eotf_sRGB_1D.spi1d')
>>> print(read_LUT_SonySPI1D(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 3x1D Sony .spi1d LUT:

>>> path = os.path.join(
...     os.path.dirname(__file__), 'tests', 'resources', 'sony_spi1d',
...     'eotf_sRGB_3x1D.spi1d')
>>> print(read_LUT_SonySPI1D(path))
LUT3x1D - eotf sRGB 3x1D
------------------------
<BLANKLINE>
Dimensions : 2
Domain     : [[-0.1 -0.1 -0.1]
              [ 1.5  1.5  1.5]]
Size       : (16, 3)
Comment 01 : Generated by "Colour 0.3.11".
Comment 02 : "colour.models.eotf_sRGB".