colour.io.write_LUT_SonySPI1D#
- colour.io.write_LUT_SonySPI1D(LUT: LUT1D | LUT3x1D | LUTSequence, path: str | Path, decimals: int = 7) bool [source]#
Write given LUT to given Sony .spi1d LUT file.
- Parameters:
- Returns:
Definition success.
- Return type:
Warning
If a
LUTSequence
class instance is passed asLUT
, the first LUT in the LUT sequence will be used.
Examples
Writing a 1D Sony .spi1d LUT:
>>> from colour.algebra import spow >>> domain = np.array([-0.1, 1.5]) >>> LUT = LUT1D( ... spow(LUT1D.linear_table(16), 1 / 2.2), ... "My LUT", ... domain, ... comments=["A first comment.", "A second comment."], ... ) >>> write_LUT_SonySPI1D(LUT, "My_LUT.cube")
Writing a 3x1D Sony .spi1d LUT:
>>> domain = np.array([[-0.1, -0.1, -0.1], [1.5, 1.5, 1.5]]) >>> LUT = LUT3x1D( ... spow(LUT3x1D.linear_table(16), 1 / 2.2), ... "My LUT", ... domain, ... comments=["A first comment.", "A second comment."], ... ) >>> write_LUT_SonySPI1D(LUT, "My_LUT.cube")