LUT Class

[size=150]LUT Class[/size]

The Draft.LUT class contains Draft’s methods for working with Color Look-Up Tables (LUT). It contains two types of functions: Static functions, and Member functions. Static functions can be invoked without an instance (by calling Draft.LUT.), whereas Member functions must be invoked from an instance of a Draft.LUT object (by calling .).

The Static functions are used to create new instances of the Draft.LUT class, whereas the Member functions are used to work with existing instances of the Draft.LUT. The sample code snippets should clarify this distinction function in case you are unsure.

[size=150]Static Functions[/size]
CreateCineon
Type: Static
Description: Return a new linear-to-Cineon LUT.
Arguments:
[list]blackLevel – Optional. An integer value in the range [0…1023] indicating the black level. Defaults to 95.
whiteLevel – Optional. An integer value in the range [0…1023] indicating the white level. Defaults to 685.
Usage:

cineonLut = Draft.LUT.CreateCineon() [/list:u]

CreateAlexaV3LogC
Type: Static
Description: Return a new linear-to-Alexa V3 Log C LUT.
Arguments: (none)
Usage:
[list] alexaLut = Draft.LUT.CreateAlexaV3LogC() [/list:u]

CreateSRGB
Type: Static
Description: Return a new linear-to-sRGB LUT.
Arguments: (none)
Usage:
[list] srgbLut = Draft.LUT.CreateSRGB() [/list:u]

CreateRec709
Type: Static
Description: Return a new linear-to-Rec. 709 LUT.
Arguments: (none)
Usage:
[list] rec709Lut = Draft.LUT.CreateRec709() [/list:u]

CreateGamma
Type: Static
Description: Return a new linear-to-Gamma LUT.
Arguments:
[list]gamma – A float value indicating the gamma to apply.
Usage:

gammaLut = Draft.LUT.CreateGamma(2.2) [/list:u]

[size=150]Member Functions[/size]
Apply
Type: Member
Description: Transform a Draft.Image’s color using this LUT.
Arguments:
[list]image – The image to transform. The image will be transformed in-place.
Usage:

image = Draft.Image.ReadFromFile( '//path/to/some/image/file.png' ) lut = Draft.LUT.CreateSRGB() lut.Apply( image )[/list:u]

Inverse
Type: Member
Description: Return a new LUT that performs the inverse operation of this LUT.
Arguments: (none)
Usage:
[list]cineonLut = Draft.LUT.CreateCineon() inverseCineonLut = cineonLut.Inverse()[/list:u]

Privacy | Site terms | Cookie preferences