Platforms to show: All Mac Windows Linux Cross-Platform
Back to LCMS2ProfileMBS class.
LCMS2ProfileMBS.Constructor(context as LCMS2ContextMBS = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
On success the handle property is not zero.
See also:
LCMS2ProfileMBS.Constructor(file as folderitem, write as boolean = false)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
file: file location.
write: Whether to create new profile.
On success the handle property is not zero.
See also:
LCMS2ProfileMBS.DetectBlackPoint(Intent as Integer, Flags as Integer) as LCMS2CIEXYZMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 12.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LCMS2ProfileMBS.DetectDestinationBlackPoint(Intent as Integer, Flags as Integer) as LCMS2CIEXYZMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 12.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This algorithm comes from the Adobe paper disclosing its black point compensation method.
LCMS2ProfileMBS.DetectRGBProfileGamma(threshold as double) as double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 22.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns -1 on error.
threshold e.g. 0.01.
LCMS2ProfileMBS.DetectTAC as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
When several colors are printed on top of each other, there is a limit to the amount of ink that can be put on paper. This maximum total dot percentage is referred to as either TIC (Total Ink Coverage) or TAC (Total Area Coverage). This function does estimate total area coverage for a given profile in %. Only works on output profiles. On RGB profiles, 400% is returned. TAC is detected by subsampling Lab color space on 6x74x74 points.
Returns estimated area coverage in % on success, 0 on error.
LCMS2ProfileMBS.FormatterForBitmap(BitCount as Integer = 8) as UInt32
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This is a convenience function which prepares you a pixel format for use with LCMS2BitmapMBS class.
Formatters are used to describe how bitmap buffers are organized.
Some examples using this method:
LCMS2ProfileMBS.FormatterForColorspace(nBytes as UInt32, IsFloat as boolean = false) as UInt32
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
nBytes is number of bytes per color value. For 3 byte RGB, you pass 1 here.
Formatters are used to describe how bitmap buffers are organized.
e.g.
nBytes = 1 and isfloat = false gives UInt8.
nBytes = 2 and isfloat = false gives UInt16.
nBytes = 4 and isfloat = true gives 32-bit float, which is Single in Xojo.
nBytes = 8 and isfloat = true gives 64-bit float, which is Double in Xojo.
Some examples using this method:
- /Images/JPEG/Apple ICC Profile to JPEG File
- /Images/LCMS2/Apple ICC Profile to JPEG File
- /Images/LCMS2/CMYK/RGB to CMYK and back
- /Images/LCMS2/Convert Grayscale Tiff to SRGB JPEG
- /Images/LCMS2/Convert image to sRGB JPEG
- /Images/LCMS2/Convert Lab Tiff to SRGB JPEG
- /Images/LCMS2/Image test
- /Images/LCMS2/RGB to Lab and back
- /Images/LCMS2/RGB to Lab and back with floats
- /Images/LCMS2/Transform Threaded
LCMS2ProfileMBS.FormatterForPCS(nBytes as UInt32, IsFloat as boolean = false) as UInt32
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Formatters are used to describe how bitmap buffers are organized.
LCMS2ProfileMBS.GetProfileInfo(Info as Integer, LanguageCode as string, CountryCode as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Info: A selector of which info to return. (kInfoCopyright, kInfoDescription, kInfoManufacturer or kInfoModel)
Language Code: first name language code from ISO-639/2.
Country Code: first name region code from ISO-3166.
Returns the string. (empty string on error)
LCMS2ProfileMBS.IsCLUT(Intent as UInt32, UsedDirection as UInt32) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Intent: The intent code.
UsedDirection: UsedAsInput = 0, UsedAsOutput = 1, UsedAsProof = 2.
Returns true CLUT is present for given intent and direction, false otherwise.
LCMS2ProfileMBS.IsIntentSupported(Intent as UInt32, UsedDirection as UInt32) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Little CMS has a fallback strategy that allows to specify any rendering intent when creating the transform, but the intent really being used may be another if the requested intent is not implemented.
UsedDirection: UsedAsInput = 0, UsedAsOutput = 1, UsedAsProof = 2.
Returns true if the intent is implemented, false otherwise.
LCMS2ProfileMBS.IsTag(TagSignature as Integer) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Useful to check if a profile contains a given tag.
Returns true if the tag is found or false otherwise.
LCMS2ProfileMBS.LinkTag(sig as Integer, dest as Integer) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Using this function you can collapse several tag entries to the same block in the profile.
sig: Signature of linking tag.
dest: Signature of linked tag.
Returns ture on success, false on error
Some examples using this method:
LCMS2ProfileMBS.MD5computeID as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success or false on failure.
LCMS2ProfileMBS.PostScriptCRD(context as LCMS2ContextMBS, intent as UInt32, flags as UInt32 = 0) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 12.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
context: Optional a user-defined context cargo.
Intent: The intent code, as described in Intents constants.
Flags: A combination of bit-field kcmsFLAGS* constants.
Returns: The resource as string or an empty string on error.
LCMS2ProfileMBS.PostScriptCSA(context as LCMS2ContextMBS, intent as UInt32, flags as UInt32 = 0) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 12.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
context: Optional a user-defined context cargo.
Intent: The intent code, as described in Intents constants.
Flags: A combination of bit-field kcmsFLAGS* constants.
Returns: The resource as string or an empty string on error.
LCMS2ProfileMBS.SaveProfileToFile(file as folderitem) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success and false on failure.
Some examples using this method:
LCMS2ProfileMBS.SaveProfileToMemory as Memoryblock
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns memoryblock on success and nil on failure.
Some examples using this method:
LCMS2ProfileMBS.SaveProfileToString as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns string with profile data on success and "" on failure.
Some examples using this method:
LCMS2ProfileMBS.TagLinkedTo(sig as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
sig: Signature of linking tag.
Returns signature of linked tag, or 0 if no tag is linked.
LCMS2ProfileMBS.TagSignature(index as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
index: index to a tag position (0-based)
Returns the tag signature on success, 0 on error.
Changed in v23.5 to raise exception for invalid index.
LCMS2ProfileMBS.TagSignatures as Integer()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | LCMS2 | MBS Images Plugin | 23.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The array contains all tags and you can loop over the array and use ReadTag()
The items on this page are in the following plugins: MBS Images Plugin.