Platforms to show: All Mac Windows Linux Cross-Platform

Back to LCMS2MBS module.

Previous items

LCMS2MBS.OPTIMIZED_SH(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shifts the value so you can bitwise or it with other values to get a pixel format.

Optimized -- previous optimization already returns the final 8-bit value.

LCMS2MBS.PixelFormat(FloatingPoint as boolean, Optimized as boolean, ColorSpace as UInt32, MinIsWhite as boolean, Planar as boolean, EndianSwap as boolean, DoSwap as boolean, ExtraSamples as UInt32, Channels as UInt32, BytesPerSample as UInt32, SwapFirst as boolean) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Utility function to create a pixel format.

Format of pixel is defined by one UInt32, using bit fields as follows

A O TTTTT U Y F P X S EEE CCCC BBB

FloatingPoint: With this flag we can differentiate 16 bits as float and as int
Optimized: Previous optimization already returns the final 8-bit value
ColorSpace: Pixeltype
MinIsWhite: Flavor 0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)
Planar: Planar? 0=Chunky, 1=Planar
EndianSwap: swap 16 bps endianess?
DoSwap: Do swap? ie, BGR, KYMC
ExtraSamples: Extra samples
Channels: Channels (Samples per pixel)
BytesPerSample: bytes per sample
SwapFirst: Swap first - changes ABGR to BGRA and KCMY to CMYK

LCMS2MBS.PLANAR_SH(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shifts the value so you can bitwise or it with other values to get a pixel format.

Planar? 0=Chunky, 1=Planar

LCMS2MBS.PREMUL_SH(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 22.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shifts the value so you can bitwise or it with other values to get a pixel format.

Premultiplied? 0=No, 1=Yes

LCMS2MBS.SetAdaptationState(context as LCMS2ContextMBS, d as Double) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets adaptation state for absolute colorimetric intent, on all but CreateExtendedTransform.

Little CMS can handle incomplete adaptation states.

d: Degree on adaptation 0=Not adapted, 1=Complete adaptation, in-between=Partial adaptation. Use negative values to return the global state without changing it.

Returns previous global adaptation state.

See also:

LCMS2MBS.SetAdaptationState(d as Double) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets adaptation state for absolute colorimetric intent, on all but CreateExtendedTransform.

Little CMS can handle incomplete adaptation states.

d: Degree on adaptation 0=Not adapted, 1=Complete adaptation, in-between=Partial adaptation. Use negative values to return the global state without changing it.

Returns previous global adaptation state.

See also:

LCMS2MBS.SetAlarmCodes(context as LCMS2ContextMBS, values() as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the global codes used to mark out-out-gamut on Proofing transforms.

Values are meant to be encoded in 16 bits.
AlarmCodes: Array of 16 codes. All 16 values must be specified, set to zero for unused channels.

See also:

LCMS2MBS.SetAlarmCodes(values() as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the global codes used to mark out-out-gamut on Proofing transforms.

Values are meant to be encoded in 16 bits.
AlarmCodes: Array of 16 codes. All 16 values must be specified, set to zero for unused channels.

See also:

LCMS2MBS.SetLogErrorHandler(Context as LCMS2ContextMBS, handler as LCMS2ErrorHandlerMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Allows user to set any specific logger.

Each time this function is called, the previous logger is replaced. Calling this functin with NULL as parameter, does reset the logger to the default Little CMS logger. The default Little CMS logger does nothing.

LCMS2ErrorHandlerMBS is an Interface. You add it to the interface of your window/thread/class. Than you get a method "Error(context as LCMS2ContextMBS, ErrorCode as UInt32, Text as string)" which is called to log error messages. The context parameter is the object you pass for reference in the various context parameters to LCMS2 functions.

See also:

Some examples using this method:

LCMS2MBS.SetLogErrorHandler(handler as LCMS2ErrorHandlerMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Allows user to set any specific logger.

Each time this function is called, the previous logger is replaced. Calling this functin with NULL as parameter, does reset the logger to the default Little CMS logger. The default Little CMS logger does nothing.

LCMS2ErrorHandlerMBS is an Interface. You add it to the interface of your window/thread/class. Than you get a method "Error(context as LCMS2ContextMBS, ErrorCode as UInt32, Text as string)" which is called to log error messages. The context parameter is the object you pass for reference in the various context parameters to LCMS2 functions.

See also:

LCMS2MBS.SWAPFIRST_SH(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shifts the value so you can bitwise or it with other values to get a pixel format.

Swap first - changes ABGR to BGRA and KCMY to CMYK

LCMS2MBS.TagInteger(tag as string) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts tag integer to string.
Example
MsgBox hex(LCMS2MBS.TagInteger("devs"))+" "+LCMS2MBS.TagString(&h64657673)

LCMS2MBS.TagString(tag as UInt32) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts tag string to integer.
Example
MsgBox hex(LCMS2MBS.TagInteger("devs"))+" "+LCMS2MBS.TagString(&h64657673)

LCMS2MBS.TempFromWhitePoint(TempK as LCMS2CIExyYMBS) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Correlates a black body temperature in K from given chromaticity.
Example
dim c as new LCMS2CIExyYMBS

c.x = 0.32
c.y = 0.32
c.YY = 1.0

MsgBox str(LCMS2MBS.TempFromWhitePoint(c))

Returns temperature. Or zero on any error.

LCMS2MBS.T_BIT15(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Bit15 flag

LCMS2MBS.T_BYTES(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

bytes per sample

Some examples using this method:

LCMS2MBS.T_CHANNELS(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Channels (Samples per pixel)

Some examples using this method:

LCMS2MBS.T_COLORSPACE(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Pixeltype

LCMS2MBS.T_DITHER(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 20.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

dither flag

LCMS2MBS.T_DOSWAP(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Do swap? ie, BGR, KYMC

LCMS2MBS.T_ENDIAN16(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

swap 16 bps endianess?

LCMS2MBS.T_EXTRA(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Extra samples

LCMS2MBS.T_FLAVOR(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Flavor 0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)

LCMS2MBS.T_FLOAT(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Floating point -- With this flag we can differentiate 16 bits as float and as int

LCMS2MBS.T_OPTIMIZED(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Optimized -- previous optimization already returns the final 8-bit value

LCMS2MBS.T_PLANAR(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Planar? 0=Chunky, 1=Planar

LCMS2MBS.T_PREMUL(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 22.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Premultiplied? 0=Yes, 1=No

LCMS2MBS.T_SWAPFIRST(n as UInt32) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unpacks a value from a bitwise pixel format.

Swap first - changes ABGR to BGRA and KCMY to CMYK.

LCMS2MBS.Version as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns version number of LCMS2.
Example
MsgBox LCMS2MBS.Version

LCMS2MBS.WhitePointFromTemp(TempK as Double) as LCMS2CIExyYMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Correlates a black body chromaticity from given temperature in K.
Example
dim c as LCMS2CIExyYMBS = LCMS2MBS.WhitePointFromTemp(6500)

MsgBox str(c.x)+" "+str(c.y)+" "+str(c.yy)

Valid range is 4000K-25000K.
TempK: Temperature in oK
Returns white point or nil in case of error.

Some examples using this method:

LCMS2MBS.xyY2XYZ(p as LCMS2CIExyYMBS) as LCMS2CIEXYZMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Colorimetric space conversion from xyY to XYZ.

LCMS2MBS.XYZ2Lab(p as LCMS2CIEXYZMBS, whitepoint as LCMS2CIEXYZMBS = nil) as LCMS2CIELabMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts XYZ color to Lab.

Setting WhitePoint to nil forces D50 as white point.

LCMS2MBS.XYZ2xyY(p as LCMS2CIEXYZMBS) as LCMS2CIExyYMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Colorimetric space conversion from XYZ to xyY.

LCMS2MBS.XYZEncoded2Float(w0 as UInt16, w1 as UInt16, w2 as UInt16) as LCMS2CIEXYZMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Decodes a XYZ value, encoded on ICC convention to a LCMS2CIEXYZMBS value.

w0,w1 and w2: Array of 3 UInt16 values holding the encoded valkues.
Returns XYZ color on success or nil on failure.

Some examples using this method:

Previous items

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


The biggest plugin in space...