colour.io.write_LUT_IridasCube

colour.io.write_LUT_IridasCube(LUT, path, decimals=7)[source]

Writes given LUT to given Iridas .cube LUT file.

Parameters:
  • LUT (LUT3x1D or LUT3d or LUTSequence) – LUT3x1D, LUT3D or LUTSequence class instance to write at given path.
  • path (unicode) – LUT path.
  • decimals (int, optional) – Formatting decimals.
Returns:

Definition success.

Return type:

bool

Warning

  • If a LUTSequence class instance is passed as LUT, the first LUT in the LUT sequence will be used.

References

[AdobeSystems13c]

Examples

Writing a 3x1D Iridas .cube LUT:

>>> from colour.algebra import spow
>>> domain = np.array([[-0.1, -0.2, -0.4], [1.5, 3.0, 6.0]])
>>> LUT = LUT3x1D(
...     spow(LUT3x1D.linear_table(16, domain), 1 / 2.2),
...     'My LUT',
...     domain,
...     comments=['A first comment.', 'A second comment.'])
>>> write_LUT_IridasCube(LUT, 'My_LUT.cube')  # doctest: +SKIP

Writing a 3D Iridas .cube LUT:

>>> domain = np.array([[-0.1, -0.2, -0.4], [1.5, 3.0, 6.0]])
>>> LUT = LUT3D(
...     spow(LUT3D.linear_table(16, domain), 1 / 2.2),
...     'My LUT',
...     np.array([[-0.1, -0.2, -0.4], [1.5, 3.0, 6.0]]),
...     comments=['A first comment.', 'A second comment.'])
>>> write_LUT_IridasCube(LUT, 'My_LUT.cube')  # doctest: +SKIP