Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

LCMS2StageMBS.CreateStageWithCLut16bit(Context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Creates a stage that contains a 16 bits multidimensional lookup table (CLUT).
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.0 Yes Yes Yes Yes No
Function: Creates a stage that contains a 16 bits multidimensional lookup table (CLUT).
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.0 Yes Yes Yes Yes No
Function: 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

dim data() as UInt16

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

dim c,m,y,k as Double

for Grid0 as Integer = 0 to 16 // 17 grid, 1st input
dim r as Double = Grid0 / 16
for Grid1 as Integer = 0 to 16 // 17 grid, 2nd input
dim g as Double = Grid0 / 16
for Grid2 as Integer = 0 to 16 // 17 grid, 3rd input
dim 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

dim CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLut16bit(nil, 17, 3, 4, data)
break
Notes:
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:

Feedback, Comments & Corrections

LCMS2StageMBS.CreateStageWithCLut16bitGranular(Context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Similar to CreateStageWithCLut16bit, but it allows different granularity on each CLUT dimension.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Similar to CreateStageWithCLut16bit, but it allows different granularity on each CLUT dimension.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: 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
dim ChannelGridPoints(2) as UInt32
ChannelGridPoints(0) = 15
ChannelGridPoints(1) = 16
ChannelGridPoints(2) = 17

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

break
Notes:
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:

Feedback, Comments & Corrections

LCMS2StageMBS.CreateStageWithCLutFloat(Context as LCMS2ContextMBS, GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Creates a stage that contains a float multidimensional lookup table (CLUT).
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.0 Yes Yes Yes Yes No
Function: Creates a stage that contains a float multidimensional lookup table (CLUT).
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.0 Yes Yes Yes Yes No
Function: 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
dim noData() as Double = nil
dim CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLutFloat(nil, 17, 3, 4, noData)

break
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: 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

dim data() as Single

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

dim c,m,y,k as Double

for Grid0 as Integer = 0 to 16 // 17 grid, 1st input
dim r as Double = Grid0 / 16
for Grid1 as Integer = 0 to 16 // 17 grid, 2nd input
dim g as Double = Grid0 / 16
for Grid2 as Integer = 0 to 16 // 17 grid, 3rd input
dim 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

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

break
Notes:
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:

Feedback, Comments & Corrections

LCMS2StageMBS.CreateStageWithCLutFloatGranular(Context as LCMS2ContextMBS, clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32) as LCMS2StageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Similar to CreateStageWithCLutFloat, but it allows different granularity on each CLUT dimension.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Similar to CreateStageWithCLutFloat, but it allows different granularity on each CLUT dimension.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: 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
dim ChannelGridPoints(2) as UInt32
ChannelGridPoints(0) = 15
ChannelGridPoints(1) = 16
ChannelGridPoints(2) = 17

dim noData() as Single = nil
dim CLUT as LCMS2StageMBS = LCMS2StageMBS.CreateStageWithCLutFloatGranular(nil, ChannelGridPoints, 3, 4, noData)
Break
Notes:
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:

Feedback, Comments & Corrections

LCMS2StageMBS.CreateStageWithIdentity(context as LCMS2ContextMBS, Channels as UInt32) as LCMS2StageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.0 Yes Yes Yes Yes No
Function: Creates an empty (identity) stage that does no operation.
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.0 Yes Yes Yes Yes No
Function: Creates a stage that contains a matrix plus an optional offset.
Notes:
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.

Feedback, Comments & Corrections

LCMS2StageMBS.CreateStageWithToneCurves(context as LCMS2ContextMBS, ChannelCount as Integer) as LCMS2StageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.4 Yes Yes Yes Yes No
Function: Creates a stage that contains n channels tone curves, one per channel.
Notes:
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:

Feedback, Comments & Corrections

LCMS2StageMBS.CreateStageWithToneCurves(context as LCMS2ContextMBS, Channels() as LCMS2ToneCurveMBS) as LCMS2StageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 12.0 Yes Yes Yes Yes No
Function: Creates a stage that contains n channels tone curves, one per channel.
Notes:
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:

Feedback, Comments & Corrections

LCMS2StageMBS.CubeSize(clutPoints() as UInt32, inputChan as UInt32, outputChan as UInt32 = 1) as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Calculates the number of values needed for a CLUT with given dimensions.
Notes: This is a helper function, so you can know how big the table for CreateStageWithCLut16bitGranular or CreateStageWithCLutFloatGranular must be.

See also:

Feedback, Comments & Corrections

LCMS2StageMBS.CubeSize(GridPoints as UInt32, inputChan as UInt32, outputChan as UInt32 = 1) as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method LCMS2 MBS Images Plugin 15.3 Yes Yes Yes Yes No
Function: Calculates the number of values needed for a CLUT with given dimensions.
Notes: This is a helper function, so you can know how big the table for CreateStageWithCLut16bit or CreateStageWithCLutFloat must be.

See also:

Feedback, Comments & Corrections

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





Links
MBS Xojo Plugins