colour.read_LUT#
- colour.read_LUT(path: str | Path, method: Literal['Cinespace', 'Iridas Cube', 'Resolve Cube', 'Sony SPI1D', 'Sony SPI3D', 'Sony SPImtx'] | str | None = None, **kwargs: Any) LUT1D | LUT3x1D | LUT3D | LUTSequence | LUTOperatorMatrix [source]#
Read given LUT file using given method.
- Parameters:
- Returns:
colour.LUT1D
orcolour.LUT3x1D
orcolour.LUT3D
orcolour.LUTSequence
orcolour.LUTOperatorMatrix
class instance.- Return type:
colour.LUT1D
orcolour.LUT3x1D
orcolour.LUT3D
orcolour.LUTSequence
orcolour.LUTOperatorMatrix
References
[AdobeSystems13c], [Cha15], [RisingSResearch]
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 ------------------------------- 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 -------------------- 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 ---------------------- Dimensions : 3 Domain : [[ 0. 0. 0.] [ 1. 1. 1.]] Size : (4, 4, 4, 3) Comment 01 : Adapted from a LUT generated by Foundry::LUT.
Reading a Sony .spimtx LUT:
>>> path = os.path.join( ... os.path.dirname(__file__), ... "tests", ... "resources", ... "sony_spimtx", ... "dt.spimtx", ... ) >>> print(read_LUT(path)) LUTOperatorMatrix - dt ---------------------- Matrix : [[ 0.864274 0. 0. 0. ] [ 0. 0.864274 0. 0. ] [ 0. 0. 0.864274 0. ] [ 0. 0. 0. 1. ]] Offset : [ 0. 0. 0. 0.]