colour.io.write_LUT_SonySPI1D#
- colour.io.write_LUT_SonySPI1D(LUT: LUT1D | LUT3x1D | LUTSequence, path: str | PathLike, decimals: int = 7) bool[source]#
Write the specified LUT to the specified Sony .spi1d LUT file.
- Parameters:
- Returns:
Whether the write operation was successful.
- Return type:
Warning
If a
LUTSequenceclass 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.spi1d")
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.spi1d")