Platforms to show: All Mac Windows Linux Cross-Platform

Back to LCMS2ToneCurveMBS class.

LCMS2ToneCurveMBS.EstimatedTable as UInt16()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Tone curves do maintain a shadow low‐resolution tabulated representation of the curve. This function returns an array with this table.

LCMS2ToneCurveMBS.EstimatedTableEntries as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Tone curves do maintain a shadow low‐resolution tabulated representation of the curve. This function returns the number of entries such table has.

LCMS2ToneCurveMBS.EstimateGamma(Precision as Double = 0.01) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Estimates the apparent gamma of the tone curve by using least squares fitting to a pure exponential expression in the f(𝑥) = 𝑥.
Example
dim t as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildGamma(nil, 2.2)
MsgBox str(t.EstimateGamma)

Precision: The maximum standard deviation allowed on the residuals, 0.01 is a fair value, set it to a big number to fit any curve, mo matter how good is the fit.

Returns the estimated gamma at given precision, or -1.0 if the fitting has less precision.

LCMS2ToneCurveMBS.EvalToneCurve16(value as UInt16) as UInt16

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Evaluates the given 16-bit number across the given tone curve.

This function is significantly faster than EvalToneCurveFloat, since it uses a pre-computed 16-bit lookup table.
Value: 16 bit Number to evaluate
Returns operation result

LCMS2ToneCurveMBS.EvalToneCurveFloat(value as Single) as Single

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Evaluates the given floating-point number across the given tone curve.
Example
dim t1 as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildGamma(nil, 1.0)
dim t2 as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildGamma(nil, 2.0)
dim t3 as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildGamma(nil, 3.0)

dim v1 as Double = t1.EvalToneCurveFloat(0.5)
dim v2 as Double = t2.EvalToneCurveFloat(0.5)
dim v3 as Double = t3.EvalToneCurveFloat(0.5)

MsgBox str(v1)+" "+str(v2)+" "+str(v3)

Value: floating point number to evaluate
Returns the result.

LCMS2ToneCurveMBS.IsDescending as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if f(0) > f(1) , false otherwise.

Does not take unbounded parts into account.

Some examples using this method:

LCMS2ToneCurveMBS.IsLinear as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an estimation of cube being an identity (1:1) in the [0..1] domain.

Does not take unbounded parts into account. This is just a coarse approximation, with no mathematical validity.

Some examples using this method:

LCMS2ToneCurveMBS.IsMonotonic as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an estimation of monotonicity of curve in the [0..1] domain.
Example
dim t as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildGamma(nil, 2.2)
MsgBox "IsMonotonic: "+str(t.IsMonotonic)

Does not take unbounded parts into account. This is just a coarse approximation, with no mathematical validity.

Some examples using this method:

LCMS2ToneCurveMBS.IsMultisegment as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if the tone curve contains more than one segment, false if it has only one segment.

Some examples using this method:

LCMS2ToneCurveMBS.ParametricType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the parametric type.

Some examples using this method:

LCMS2ToneCurveMBS.Reverse as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a tone curve that is the inverse f-1 of given tone curve.

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

See also:

LCMS2ToneCurveMBS.Reverse(nResultSamples as Integer) as LCMS2ToneCurveMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a tone curve that is the inverse f-1 of given tone curve.

In the case it couldn't be analytically reversed, a tablulated curve of nResultSamples is created.
nResultSamples: Number of samples to use in the case origin tone curve couldn't be analytically reversed
Returns a newly created tone curve object on success, nil on error.

See also:

LCMS2ToneCurveMBS.Smooth(lambda as Double) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Smoothes tone curve according to the lambda parameter.

Lambda: degree of smoothing.
Returns true on success, false on error.

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


The biggest plugin in space...