Platforms to show: All Mac Windows Linux Cross-Platform

Back to LCMS2StageMBS class.

LCMS2StageMBS.CreateStageWithCLut16bit(Context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a 16 bits multidimensional lookup table (CLUT).

Each dimension has same resolution.

Context: Pointer to a user-defined context cargo.
GridPoints: the number of nodes (same for each component).
inputChan: Number of input channels.
outputChan: Number of output channels.

Returns a pipeline stage on success, nil on error.

See also:

Some examples using this method:

LCMS2StageMBS.CreateStageWithCLut16bit(context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32, TableUInt16 as Memoryblock) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a 16 bits multidimensional lookup table (CLUT).

Each dimension has same resolution. The CLUT can be initialized by specifying values in Table parameter. The recommended way is to set Table to nil and use StageSampleCLut16bit with a event, because this way the implementation is independent of the selected number of grid points.

Context: Pointer to a user-defined context cargo.
GridPoints: the number of nodes (same for each component).
inputChan: Number of input channels.
outputChan: Number of output channels.
Table: Memoryblock with a table of UInt16, holding initial values for nodes. If nil the CLUT is initialized to zero.

Returns a pipeline stage on success, nil on error.
Raises exception if table memoryblock is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLut16bit(context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32, values() as UInt16) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a 16 bits multidimensional lookup table (CLUT).
Example
// creates CLUT with 17 grid points, 3 input channels RGB and 4 output channels CMYK

Var data() as UInt16

// fill all the data into the table upfront, RGB to CMYK

Var c,m,y,k as Double

for Grid0 as Integer = 0 to 16 // 17 grid, 1st input
Var r as Double = Grid0 / 16
for Grid1 as Integer = 0 to 16 // 17 grid, 2nd input
Var g as Double = Grid0 / 16
for Grid2 as Integer = 0 to 16 // 17 grid, 3rd input
Var b as Double = Grid0 / 16

// some bad conversion

c = r
m = g
y = b
k = 0

// fill array with values
data.Append 65535 * c
data.Append 65535 * m
data.Append 65535 * y
data.Append 65535 * k

next
next
next

Var CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLut16bit(nil, 17, 3, 4, data)
break

Each dimension has same resolution. The CLUT can be initialized by specifying values in Table parameter.

Context: Pointer to a user-defined context cargo.
GridPoints: the number of nodes (same for each component).
inputChan: Number of input channels.
outputChan: Number of output channels.
values: array of UInt16, holding initial values for nodes.

Returns a pipeline stage on success, nil on error.
Raises exception if values array is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLut16bitGranular(Context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Similar to CreateStageWithCLut16bit, but it allows different granularity on each CLUT dimension.

Context: user-defined context cargo.
clutPoints: Memoryblock with array [inputChan] of UInt32 holding the number of nodes for each component.
inputChan: Number of input channels.
outputChan: Number of output channels.

Returns a pipeline stage on success, nil on error.

See also:

LCMS2StageMBS.CreateStageWithCLut16bitGranular(context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32, TableUInt16 as Memoryblock) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Similar to CreateStageWithCLut16bit, but it allows different granularity on each CLUT dimension.

Context: user-defined context cargo.
clutPoints: Memoryblock with array [inputChan] of UInt32 holding the number of nodes for each component.
inputChan: Number of input channels.
outputChan: Number of output channels.
Table: Memoryblock with table of UInt16, holding initial values for nodes. If nil the CLUT is initialized to zero.

Returns a pipeline stage on success, nil on error.
Raises exception if table memoryblock is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLut16bitGranular(Context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32, TableUInt16() as UInt16) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Similar to CreateStageWithCLut16bit, but it allows different granularity on each CLUT dimension.
Example
// create CLUT with 15 grid points for 1st channel, 16 for 2nd channel and 17 for 3rd channel
Var ChannelGridPoints(2) as UInt32
ChannelGridPoints(0) = 15
ChannelGridPoints(1) = 16
ChannelGridPoints(2) = 17

Var noData() as UInt16 = nil
Var CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLut16bitGranular(nil, ChannelGridPoints, 3, 4, noData)

break

Context: user-defined context cargo.
clutPoints: Array [inputChan] of UInt32 holding the number of nodes for each component.
inputChan: Number of input channels.
outputChan: Number of output channels.
Table: Table of UInt16, holding initial values for nodes. If nil/empty the CLUT is initialized to zero.

Returns a pipeline stage on success, nil on error.
Raises exception if values array is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLutFloat(Context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a float multidimensional lookup table (CLUT).

Each dimension has same resolution.

Context: user-defined context cargo.
GridPoints: the number of nodes (same for each component).
inputChan: Number of input channels.
outputChan: Number of output channels.

Returns a pipeline stage on success, nil on error.

See also:

LCMS2StageMBS.CreateStageWithCLutFloat(context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32, TableSingle as Memoryblock) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a float multidimensional lookup table (CLUT).

Each dimension has same resolution. The CLUT can be initialized by specifying values in Table parameter. The recommended way is to set Table to nil and use StageSampleCLutFloat with an event, because this way the implementation is independent of the selected number of grid points.

Context: user-defined context cargo.
GridPoints: the number of nodes (same for each component).
inputChan: Number of input channels.
outputChan: Number of output channels.
Table: Memoryblock with a table of Single (Float32) values, holding initial values for nodes. If nil the CLUT is initialized to zero.

Returns a pipeline stage on success, nil on error.
Raises exception if table memoryblock is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLutFloat(context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32, values() as Double) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a float multidimensional lookup table (CLUT).
Example
// creates CLUT with 17 grid points, 3 input channels and 4 output channels
Var noData() as Double = nil
Var CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLutFloat(nil, 17, 3, 4, noData)

break

Each dimension has same resolution. The CLUT can be initialized by specifying values in Table parameter.

Context: user-defined context cargo.
GridPoints: the number of nodes (same for each component).
inputChan: Number of input channels.
outputChan: Number of output channels.
values: Array of double values, holding initial values for nodes.

Returns a pipeline stage on success, nil on error.
Raises exception if values array is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLutFloat(Context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32, values() as single) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a float multidimensional lookup table (CLUT).
Example
// creates CLUT with 17 grid points, 3 input channels RGB and 4 output channels CMYK

Var data() as Single

// fill all the data into the table upfront, RGB to CMYK

Var c,m,y,k as Double

for Grid0 as Integer = 0 to 16 // 17 grid, 1st input
Var r as Double = Grid0 / 16
for Grid1 as Integer = 0 to 16 // 17 grid, 2nd input
Var g as Double = Grid0 / 16
for Grid2 as Integer = 0 to 16 // 17 grid, 3rd input
Var b as Double = Grid0 / 16

// some bad conversion

c = r
m = g
y = b
k = 0

// fill array with values
data.Append c
data.Append m
data.Append y
data.Append k

next
next
next

Var CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLutFloat(nil, 17, 3, 4, data)

break

Each dimension has same resolution. The CLUT can be initialized by specifying values in Table parameter.

Context: user-defined context cargo.
GridPoints: the number of nodes (same for each component).
inputChan: Number of input channels.
outputChan: Number of output channels.
values: Array of single (Float32) values, holding initial values for nodes.

Returns a pipeline stage on success, nil on error.
Raises exception if values array is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLutFloatGranular(Context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Similar to CreateStageWithCLutFloat, but it allows different granularity on each CLUT dimension.

Context: user-defined context cargo.
clutPoints: Memoryblock with Array of UInt32 [inputChan] holding the number of nodes for each component.
inputChan: Number of input channels.
outputChan: Number of output channels.

Returns a pipeline stage on success, nil on error.

See also:

LCMS2StageMBS.CreateStageWithCLutFloatGranular(context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32, TableSingle as Memoryblock) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Similar to CreateStageWithCLutFloat, but it allows different granularity on each CLUT dimension.

Context: user-defined context cargo.
clutPoints: Memoryblock with Array of UInt32 [inputChan] holding the number of nodes for each component.
inputChan: Number of input channels.
outputChan: Number of output channels.
Table: a pointer to a table of Singles (Float32), holding initial values for nodes.

Returns a pipeline stage on success, nil on error.
Raises exception if table memoryblock is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithCLutFloatGranular(Context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32, TableSingle() as Single) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Similar to CreateStageWithCLutFloat, but it allows different granularity on each CLUT dimension.
Example
// create CLUT with 15 grid points for 1st channel, 16 for 2nd channel and 17 for 3rd channel
Var ChannelGridPoints(2) as UInt32
ChannelGridPoints(0) = 15
ChannelGridPoints(1) = 16
ChannelGridPoints(2) = 17

Var noData() as Single = nil
Var CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLutFloatGranular(nil, ChannelGridPoints, 3, 4, noData)
Break

Context: user-defined context cargo.
clutPoints: Array of UInt32 [inputChan] holding the number of nodes for each component.
inputChan: Number of input channels.
outputChan: Number of output channels.
Table: a table of Singles (Float32), holding initial values for nodes.

Returns a pipeline stage on success, nil on error.
Raises exception if values array is not empty/nil, but has wrong size.

See also:

LCMS2StageMBS.CreateStageWithIdentity(context as LCMS2ContextMBS, Channels as UInt32) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates an empty (identity) stage that does no operation.

May be needed in order to save the pipeline as AToB/BToA tags in ICC profiles.

Context: user-defined context cargo.
Channels: Number of channels

Returns a pipeline stage on success, nil on error.

LCMS2StageMBS.CreateStageWithMatrix(context as LCMS2ContextMBS, Rows as UInt32, Cols as UInt32, Matrix as Memoryblock, Offset as Memoryblock = nil) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains a matrix plus an optional offset.

Note that Matrix is specified in double precision, whilst CLUT has only float precision. That is because an ICC profile can encode matrices with far more precision that CLUTS.

Context: user-defined context cargo.
Rows, Cols: Dimensions of matrix
Matrix: Memoryblock with a matrix of [Rows, Cols] (double values, 8 byte per value)
Offset: Memoryblock with a vector of [Cols], nil if no offset is to be applied.

Returns a pipeline stage on success, nil on error.

LCMS2StageMBS.CreateStageWithToneCurves(context as LCMS2ContextMBS, ChannelCount as Integer) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains n channels tone curves, one per channel.

Setting Curves to nil forces identity (1:1) curves to be used. The stage keeps and owns a private copy of the tone curve objects.

Context: user-defined context cargo.
Curvess: Optionally, an array of tone curves objects, one per channel.

Returns a pipeline stage on success, nil on error.

See also:

Some examples using this method:

LCMS2StageMBS.CreateStageWithToneCurves(context as LCMS2ContextMBS, Channels() as LCMS2ToneCurveMBS) as LCMS2StageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a stage that contains n channels tone curves, one per channel.

Setting Curves to nil forces identity (1:1) curves to be used. The stage keeps and owns a private copy of the tone curve objects.

Context: user-defined context cargo.
Curvess: Optionally, an array of tone curves objects, one per channel.

Returns a pipeline stage on success, nil on error.

See also:

LCMS2StageMBS.CubeSize(clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32 = 1) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates the number of values needed for a CLUT with given dimensions.

This is a helper function, so you can know how big the table for CreateStageWithCLut16bitGranular or CreateStageWithCLutFloatGranular must be.

See also:

LCMS2StageMBS.CubeSize(GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32 = 1) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates the number of values needed for a CLUT with given dimensions.

This is a helper function, so you can know how big the table for CreateStageWithCLut16bit or CreateStageWithCLutFloat must be.

See also:

The items on this page are in the following plugins: MBS Images Plugin.


The biggest plugin in space...