Platforms to show: All Mac Windows Linux Cross-Platform

Back to LCMS2ToneCurveMBS class.

LCMS2ToneCurveMBS.BuildGamma(context as LCMS2ContextMBS, gamma as Double) as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Simplified wrapper to BuildParametricToneCurve.
Example
dim t as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildGamma(nil, 2.2)
MsgBox str(t.EstimateGamma)

Builds a parametric curve of type 1.

Context: user-defined context object.
Gamma: Value of gamma exponent

Returns a newly created tone curve object on success, nil on error.

Some examples using this method:

LCMS2ToneCurveMBS.BuildParametricToneCurve(context as LCMS2ContextMBS, Type as Integer, params() as Double) as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a parametric tone curve.

Parameters:
context: user-defined context object.
Type: Number of parametric tone curve. (see LCMS2 manual)
Params: Array of tone curve parameters.

Returns a newly created tone curve object on success, nil on error.

LCMS2ToneCurveMBS.BuildSegmentedToneCurve(context as LCMS2ContextMBS, Segments() as LCMS2CurveSegmentMBS) as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a tone curve from given segment information.

context: Puser-defined context object
Segments: Array of segments

Returns a newly created tone curve object on success, nil on error.

LCMS2ToneCurveMBS.BuildTabulatedToneCurve(context as LCMS2ContextMBS, values() as Single) as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a tone curve based on a table of floating point values.
Example
dim values(-1) as Single

for i as Integer = 0 to 9
values.Append 0.5 + i*0.02
next

dim t as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildTabulatedToneCurve(nil, values)

dim items(-1) as string
for i as Integer = 0 to 10
dim v as Single = t.EvalToneCurveFloat(i/10.0)
items.Append str(i/10.0)+" -> "+str(v)
next

MsgBox Join(items,EndOfLine)

Tone curves built with this function are not restricted to 0...1.0 domain.

context: user-defined context object.
values: Array of samples. Domain of samples is 0...1.0

Returns a newly created tone curve object on success, nil on error.

See also:

LCMS2ToneCurveMBS.BuildTabulatedToneCurve(context as LCMS2ContextMBS, values() as UInt16) as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a tone curve based on a table of 16-bit values. Tone curves built with this function are restricted to 0...1.0 domain.

context: user-defined context object.
values: Array of samples. Domain is 0...65535 (UInt32).

Returns a newly created tone curve object on success, nil on error.

See also:

LCMS2ToneCurveMBS.JoinToneCurve(context as LCMS2ContextMBS, X as LCMS2ToneCurveMBS, Y as LCMS2ToneCurveMBS, nPoints as UInt32) as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Composites two tone curves in the form 𝑌−1(𝑋(𝑡)).

context: user-defined context object.
X, Y : Tone curve objects.
nPoints: Sample rate for resulting tone curve.

Returns a newly created tone curve object on success, nil on error.

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


The biggest plugin in space...