Platforms to show: All Mac Windows Linux Cross-Platform

Back to LCMS2ProfileMBS class.

LCMS2ProfileMBS.cmsV2Unicode as String   New in 24.0

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 24.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns special constant to access unicode string for V2 profiles.
Example
// special v2 unicode string
Dim ProfileVersion As Integer = MyProfile.ProfileVersion

If ProfileVersion = 2 Then
Dim cmsV2Unicode As String = LCMS2ProfileMBS.cmsV2Unicode
Dim s2 As String = MyMLU.getUnicode(cmsV2Unicode, cmsV2Unicode)

If s2<>"" Then
List.AddRow "V2 Unicode Text", s2
End If
End If

LCMS2ProfileMBS.CreateBCHSWabstractProfile(context as LCMS2ContextMBS, nLUTPoints as UInt32, Bright as double, Contrast as double, Hue as double, Saturation as double, TempSrc as UInt32, TempDest as UInt32) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates an abstract devicelink operating in Lab for Bright/Contrast/Hue/Saturation and white point translation.

White points are specified as temperatures degree of Kelvin.

context: optional context object.
nLUTPoints: Resulting colormap resolution
Bright: Bright increment. May be negative
Contrast: Contrast increment. May be negative.
Hue: Hue displacement in degree.
Saturation: Saturation increment. May be negative
TempSrc: Source white point temperature
TempDest: Destination white point temperature.

Returns an ICC profile object on success, nil on error.

LCMS2ProfileMBS.CreateGrayProfile(context as LCMS2ContextMBS, WhitePoint as LCMS2CIExyYMBS, TransferFunction as LCMS2ToneCurveMBS) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function creates a gray profile based on White point and transfer function.

It populates followingtags; this conform a standard gray display profile:

1cmsSigProfileDescriptionTag
2cmsSigMediaWhitePointTag
3cmsSigGrayTRCTag

Context: Optional context object.
WhitePoint: The white point of the gray device or space.
TransferFunction: tone curve describing the device or space gamma.

Returns an ICC profile object on success, NULL on error.

Some examples using this method:

LCMS2ProfileMBS.CreateInkLimitingDeviceLink(context as LCMS2ContextMBS, ColorSpaceSignature as UInt32, Limit as Double) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This is a devicelink operating in CMYK for ink-limiting.

Space: any color space signature. Currently only kcmsSigCmykData is supported.
Limit: Amount of ink limiting in % (0..400%)

Returns new profile or nil on error.

Some examples using this method:

LCMS2ProfileMBS.CreateLab2Profile(context as LCMS2ContextMBS = nil, point as LCMS2CIExyYMBS = nil) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a Lab to Lab identity, marking it as v2 ICC profile.

Adjustments for accomodating PCS endoing shall be done by Little CMS when using this profile.

Context: The optional context object.
WhitePoint: Lab reference white. nil for D50.

Returns a handle to an ICC profile object on success, nil on error.

Some examples using this method:

LCMS2ProfileMBS.CreateLab4Profile(context as LCMS2ContextMBS = nil, point as LCMS2CIExyYMBS = nil) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a Lab to Lab identity, marking it as v4 ICC profile.

Context: The optional context object.
WhitePoint: Lab reference white. nil for D50.

Returns a handle to an ICC profile object on success, nil on error.

Some examples using this method:

LCMS2ProfileMBS.CreateLinearizationDeviceLink(context as LCMS2ContextMBS, ColorSpaceSignature as UInt32, TransferFunction() as LCMS2ToneCurveMBS) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This is a devicelink operating in the target colorspace with as many transfer functions ascomponents.

Space: The desired color space signature. Like &h52474220 for RGB.
TransferFunction: tone curves describing the device or space linearization.

Please make sure you pass right number of transfer functions matching number of channels of color space.

A handle to an ICC profile object on success, NULL on error.

LCMS2ProfileMBS.CreateNULLProfile(context as LCMS2ContextMBS = nil) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a fake NULL profile.

This profile return 1 channel as always 0. Is useful only for gamut checking tricks.
Returns an ICC profile object on success, nil on error.

LCMS2ProfileMBS.CreateProfilePlaceholder(context as LCMS2ContextMBS = nil) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates an empty profile object, to be populated by the programmer.

WARNING: The profile without adding any information is not directly useable.

Context: The context object.
Returns an ICC profile object on success, nil on error.

Some examples using this method:

LCMS2ProfileMBS.CreateRGBProfile(context as LCMS2ContextMBS, WhitePoint as LCMS2CIExyYMBS, Primaries as LCMS2CIExyYTripleMBS, TransferFunction() as LCMS2ToneCurveMBS) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function creates a RGB profile based on White point, primaries and transfer functions.

It populates following tags; this conform a standard RGB Display Profile, and then I add (As per addendum II) chromaticity tag.

1cmsSigProfileDescriptionTag
2cmsSigMediaWhitePointTag
3cmsSigRedColorantTag
4cmsSigGreenColorantTag
5cmsSigBlueColorantTag
6cmsSigRedTRCTag
7cmsSigGreenTRCTag
8cmsSigBlueTRCTag
9Chromatic adaptation Tag
10cmsSigChromaticityTag

Context: Optional context object.
WhitePoint: The white point of the RGB device or space.
Primaries: The primaries in xyY of the device or space.
TransferFunction: 3 tone curves describing the device or space gamma. (if you pass just one, the plugin uses it for all three channels)

Returns the new ICC profile object or nil on any error.

Some examples using this method:

LCMS2ProfileMBS.CreateSRGBProfile(context as LCMS2ContextMBS = nil) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Create an ICC virtual profile for sRGB space.

sRGB is a standard RGB color space created cooperatively by HP and Microsoft in 1996 for use on monitors, printers, and the Internet.

sRGB white point is D65.
xyY 0.3127, 0.3291, 1.0

Primaries are ITU-R BT.709-5 (xYY)
R0.6400, 0.3300, 1.0
G0.3000, 0.6000, 1.0
B0.1500, 0.0600, 1.0

31
Predefined virtual profiles sRGB transfer functions are defined by:

If R'sRGB, G'sRGB, B'sRGB < 0.04045
R = R'sRGB / 12.92
G = G'sRGB / 12.92
B = B'sRGB / 12.92
elseif R'sRGB, G'sRGB, B'sRGB >= 0.04045
R = ((R'sRGB + 0.055) / 1.055)^2.4
G = ((G'sRGB + 0.055) / 1.055)^2.4
B = ((B'sRGB + 0.055) / 1.055)^2.4
end if

Context: Optional context object.
Returns an ICC profile object on success, nil on error.

Some examples using this method:

LCMS2ProfileMBS.CreateXYZProfile(context as LCMS2ContextMBS = nil) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a XYZ to XYZ identity, marking it as v4 ICC profile.

WhitePoint used in Absolute colorimetric intent is D50.
Returns the new profile on success or nil on failure.

LCMS2ProfileMBS.OpenProfileFromFile(context as LCMS2ContextMBS, file as folderitem, write as boolean = false) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a profile from a file or creates a new profile file there.

context: Optional context object.
file: The folderitem for the file location.
write: If true, a new profile is created. If false an existing profile is opened.

Returns a new ICC Profile object on success or nil on failure.

See also:

Some examples using this method:

LCMS2ProfileMBS.OpenProfileFromFile(file as folderitem, write as boolean = false) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a profile from a file or creates a new profile file there.
Example
Dim path As String = "/Library/ColorSync/Profiles/Blue Tone.icc"
dim file as new FolderItem(path, FolderItem.PathModes.Native)
Dim p As LCMS2ProfileMBS = LCMS2ProfileMBS.OpenProfileFromFile(file)

MessageBox p.TagCount.ToString+" tags"

context: Optional context object.
file: The folderitem for the file location.
write: If true, a new profile is created. If false an existing profile is opened.

Returns a new ICC Profile object on success or nil on failure.

See also:

LCMS2ProfileMBS.OpenProfileFromMemory(context as LCMS2ContextMBS, data as Memoryblock) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens an ICC profile which is entirely contained in a memory block.

Context: Optional, the context object.
Data: The profile data.

Useful for accessing embedded profiles. This buffer must hold a full profile image. Memory must be contiguous.
Returns an ICC profile object on success, nil on error.

See also:

Some examples using this method:

LCMS2ProfileMBS.OpenProfileFromMemory(data as Memoryblock) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens an ICC profile which is entirely contained in a memory block.

Context: Optional, the context object.
Data: The profile data.

Useful for accessing embedded profiles. This buffer must hold a full profile image. Memory must be contiguous.
Returns an ICC profile object on success, nil on error.

See also:

LCMS2ProfileMBS.OpenProfileFromString(context as LCMS2ContextMBS, data as string) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens an ICC profile which is entirely contained in a string.

Context: Optional, the context object.
Data: The profile data.

Useful for accessing embedded profiles. This buffer must hold a full profile image. Memory must be contiguous.
Returns an ICC profile object on success, nil on error.

See also:

Some examples using this method:

LCMS2ProfileMBS.OpenProfileFromString(data as string) as LCMS2ProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens an ICC profile which is entirely contained in a string.

Context: Optional, the context object.
Data: The profile data.

Useful for accessing embedded profiles. This buffer must hold a full profile image. Memory must be contiguous.
Returns an ICC profile object on success, nil on error.

See also:

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


The biggest plugin in space...