Platforms to show: All Mac Windows Linux Cross-Platform

Back to CSProfileMBS class.

CSProfileMBS.Constructor(data as string, byref error as CFErrorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a profile with the data in the given string.
Example
dim file as FolderItem = GetFolderItem("/System/Library/ColorSync/Profiles/Generic Gray Profile.icc", FolderItem.PathTypeShell)
dim stream as BinaryStream = file.OpenAsBinaryFile(False) // BinaryStream.Open(f, false)
dim data as string = stream.read(stream.length)
dim e as CFErrorMBS
dim p as new CSProfileMBS(data, e)

MsgBox p.Description

On success the handle property is not zero.

See also:

CSProfileMBS.Constructor(DisplayID as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a new profile with the given display.

displayID: system-wide unique display ID (defined by IOKIt); pass 0 for main display.

On success the handle property is not zero.

See also:

CSProfileMBS.Constructor(file as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a new profile based on the given file.
Example
dim file as FolderItem = GetFolderItem("/System/Library/ColorSync/Profiles/Generic XYZ Profile.icc", FolderItem.PathTypeShell)
dim p as new CSProfileMBS(file)

MsgBox p.Description

On success the handle property is not zero.

See also:

CSProfileMBS.Constructor(file as folderitem, byref error as CFErrorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a new profile based on the given file.
Example
dim file as FolderItem = GetFolderItem("/System/Library/ColorSync/Profiles/Generic XYZ Profile.icc", FolderItem.PathTypeShell)
dim e as CFErrorMBS
dim p as new CSProfileMBS(file, e)

MsgBox p.Description

On success the handle property is not zero.

See also:

CSProfileMBS.Constructor(name as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a profile with the given predefined name.
Example
dim c as new CSProfileMBS(CSProfileMBS.kColorSyncGenericXYZProfile)
MsgBox c.Description

On success the handle property is not zero.

See also:

CSProfileMBS.Constructor(profileSequence() as dictionary, options as dictionary)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a link profile.

profileSequence: An array of dictionaries, each one containing a profile object and the information on the usage of the profile in the transform.

Required keys:

kColorSyncProfile: CSProfileMBS
kColorSyncRenderingIntent: String defining rendering intent
kColorSyncTransformTag: String defining which tags to use

Optional key:

kColorSyncBlackPointCompensation: Boolean to enable/disable BPC

options: dictionary with additional public global options (e.g. preferred CMM, quality, etc... It can also contain custom options that are CMM specific.

On success the handle property is not zero.

See also:

CSProfileMBS.ContainsTag(signature as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Whether the tag is contained in the profile.

CSProfileMBS.Data as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns a string with the raw data of the profile.

CSProfileMBS.Edit as CSMutableProfileMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates an editable copy of the profile.

Returns nil on any error.

CSProfileMBS.EstimateGamma as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Calculates the estimated gamma for this profile.
Example
dim file as FolderItem = GetFolderItem("/System/Library/ColorSync/Profiles/Generic Gray Profile.icc", FolderItem.PathTypeShell)
dim p as new CSProfileMBS(file)

MsgBox str(p.EstimateGamma) // 1.8

Returns non-zero value if success or 0.0 in case of error.

See also:

CSProfileMBS.EstimateGamma(byref error as CFErrorMBS) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Calculates the estimated gamma for this profile.

Returns non-zero value if success or 0.0 in case of error.

See also:

CSProfileMBS.File as folderitem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The file reference for this profile.

See also:

CSProfileMBS.File(byref error as CFErrorMBS) as folderitem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The file reference for this profile.

See also:

CSProfileMBS.Header as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns a string with the raw header content.

CSProfileMBS.MD5 as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
MD5 digest for the profile calculated as defined by ICC specification.

Returns a 16 byte string with the raw bytes of the signature.
Returns an empty string on any error.

CSProfileMBS.RawTag(signature as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the raw tag value as string.

CSProfileMBS.TagSignatures as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an array of the tag signatures.

CSProfileMBS.URL as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The URL reference for this profile.
Example
dim file as FolderItem = GetFolderItem("/System/Library/ColorSync/Profiles/Generic XYZ Profile.icc", FolderItem.PathTypeShell)
dim p as new CSProfileMBS(file)

MsgBox p.URL

See also:

CSProfileMBS.URL(byref error as CFErrorMBS) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The URL reference for this profile.

See also:

CSProfileMBS.Verify(byref errors as CFErrorMBS, byref warnings as CFErrorMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Verifies the profile.

errors: returns error strings in case problems are found which would prevent use of the profile.
warnings: returns warning strings indicating problems due to lack of conformance with the ICC specification, but not preventing use of the profile.

Returns true if profile can be used or false otherwise.

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


The biggest plugin in space...