Platforms to show: All Mac Windows Linux Cross-Platform

Back to LCMS2ProfileMBS class.

Next items

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
Creates a new empty profile.

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
Creates profile by reading in an existing profile or creating a new profile at the given location.

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
Estimate the black point.

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
Calculates the black point of a destination profile.

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
Estimate gamma space, always positive.

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
Detects total area coverage.

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
Build a suitable formatter for the colorspace of this profile.

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
Build a suitable formatter for the colorspace of this profile.

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:

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
Build a suitable formatter for the colorspace of this profile.

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
Gets several information strings from the profile, dealing with localization.

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
Returns whatever a CLUT is present in the profile for the given intent and direction.

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
Returns true if the requested intent is implemented in the given direction.

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
Returns true if a tag with signature sig is found on the profile.

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
Creates a directory entry on tag sig that points to same location as tag dest.

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
Computes a MD5 checksum and stores it as Profile ID in the profile header.

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
A wrapper on cmsGetPostScriptColorResource to simplify CRD generation.

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
A wrapper on cmsGetPostScriptColorResource to simplify CSA generation.

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.ReadChromaticAdaptation as LCMS2CIEXYZMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a chromatic adaptation.

On success returns an array of 3 XYZ values.

LCMS2ProfileMBS.ReadChromaticity as LCMS2CIExyYTripleMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads chromaticity tag.

For kcmsSigChromaticityTag.
Returns nil on error.

LCMS2ProfileMBS.ReadCIEXYZ(tag as Integer) as LCMS2CIEXYZMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as CIE XYZ value.

Works with kcmsSigBlueColorantTag, kcmsSigBlueMatrixColumnTag, kcmsSigGreenColorantTag, kcmsSigGreenMatrixColumnTag, kcmsSigLuminanceTag, kcmsSigMediaBlackPointTag, kcmsSigMediaWhitePointTag, kcmsSigRedColorantTag and kcmsSigRedMatrixColumnTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadColorantOrder as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads colorant order.

For kcmsSigColorantOrderTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadDate(tag as Integer) as LCMS2DateMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as date.

Works with kcmsSigCalibrationDateTimeTag and kcmsSigDateTimeTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadDict(tag as Integer) as LCMS2DictionaryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as Dictionary value.

Works with kcmsSigMetaTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadICCData(tag as Integer) as LCMS2ICCDataMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as ICC Data.

Works with kcmsSigDataTag, kcmsSigPs2CRD0Tag, kcmsSigPs2CRD1Tag, kcmsSigPs2CRD2Tag, kcmsSigPs2CRD3Tag, kcmsSigPs2CSATag and kcmsSigPs2RenderingIntentTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadICCMeasurementConditions as LCMS2ICCMeasurementConditionsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads IIC measurement conditions.

for kcmsSigMeasurementTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadICCViewingConditions as LCMS2ICCViewingConditionsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as ICCViewingConditions value.

Works with kcmsSigViewingConditionsTag.

LCMS2ProfileMBS.ReadMLU(tag as Integer) as LCMS2MLUMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as MLU.

Works with kcmsSigCharTargetTag, kcmsSigCopyrightTag, kcmsSigDeviceMfgDescTag, kcmsSigDeviceModelDescTag, kcmsSigProfileDescriptionTag, kcmsSigScreeningDescTag and kcmsSigViewingCondDescTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadNamedColorList(tag as Integer) as LCMS2NamedColorListMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as named color list.

Works with kcmsSigColorantTableTag, kcmsSigColorantTableOutTag, kcmsSigCrdInfoTag and kcmsSigNamedColor2Tag.
Returns nil on any error.

LCMS2ProfileMBS.ReadPipeline(tag as Integer) as LCMS2PipelineMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as pipeline.

Works with kcmsSigAToB0Tag, kcmsSigAToB1Tag, kcmsSigAToB2Tag, kcmsSigBToA0Tag, kcmsSigBToA1Tag, kcmsSigBToA2Tag, kcmsSigDToB0Tag, kcmsSigDToB1Tag, kcmsSigDToB2Tag, kcmsSigDToB3Tag, kcmsSigBToD0Tag, kcmsSigBToD1Tag, kcmsSigBToD2Tag, kcmsSigBToD3Tag, kcmsSigGamutTag, kcmsSigPreview0Tag, kcmsSigPreview1Tag and kcmsSigPreview2Tag.
Returns nil on any error.

LCMS2ProfileMBS.ReadRawTag(sig as Integer) as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads raw tag.

Similar to ReadTag*, but different in two important aspects. The important point is, this is raw data. No processing is performed, so you can effectively read wrong or broken profiles with this function. Obviously, then you have to interpret all those bytes!

sig: Signature of tag to be read

Returns memoryblock with data or nil on any error.

Those functions allows to read/write directly to the ICC profile any data, without checking anything. As a rule, mixing Raw with cooked doesn't work, so writting a tag as raw and then reading it as cooked without serializing does result into an error. If that is wha you want, you will need to dump the profile to memory or disk and then reopen it.

Returns nil on any error.

Some examples using this method:

LCMS2ProfileMBS.ReadScreening as LCMS2ScreeningMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as screening.

Works with kcmsSigScreeningTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadSequence(tag as Integer) as LCMS2SequenceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads tag as sequence.

Only for kcmsSigProfileSequenceDescTag and kcmsSigProfileSequenceIdTag.
Returns nil on any error.

LCMS2ProfileMBS.ReadSignature(tag as Integer) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a signature tag.

Works with kcmsSigColorimetricIntentImageStateTag, kcmsSigPerceptualRenderingIntentGamutTag, kcmsSigSaturationRenderingIntentGamutTag or kcmsSigTechnologyTag.

LCMS2ProfileMBS.ReadTag(tag as Integer) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a tag.

This is a convenience function which gives you the tag in whatever class the plugin thing is suitable.
Check with isa what class you get.
Returns nil on any error.

Some examples using this method:

LCMS2ProfileMBS.ReadToneCurve(tag 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
Reads tag as ToneCurve.

Works with kcmsSigBlueTRCTag, kcmsSigGrayTRCTag, kcmsSigGreenTRCTag and kcmsSigRedTRCTag.

LCMS2ProfileMBS.ReadUcrBg as LCMS2UcrBgMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads UcrBg tag.

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
Saves the contents of a profile to a memoryblock.

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
Saves the contents of a profile to a string.

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
Returns the tag linked to sig, in the case two tags are sharing same resource, or nil if the tag is not linked to any other tag.

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
Returns the signature of a tag located in n position being n a 0-based index: i.e., first tag is indexed with n=0.

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
Returns the array of tag signatures.
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)

Dim tags() As Integer = p.TagSignatures
Break // inspect array in debugger

The array contains all tags and you can loop over the array and use ReadTag()

LCMS2ProfileMBS.WriteChromaticAdaptation(value as LCMS2Mat3MBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes chromatic adaptation.

Variant of the function which takes matrix of values.

See also:

Some examples using this method:

LCMS2ProfileMBS.WriteChromaticAdaptation(values() as LCMS2CIEXYZMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes chromatic adaptation.

Pass array with 3 XYZ colors.
Returns true on success.

See also:

LCMS2ProfileMBS.WriteChromaticity(o as LCMS2CIExyYTripleMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes chromaticity tag.

For kcmsSigChromaticityTag.
Returns true on success and false on error.

Some examples using this method:

LCMS2ProfileMBS.WriteCIEXYZ(tag as Integer, o as LCMS2CIEXYZMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes CIE XYZ tag.

Works with kcmsSigBlueColorantTag, kcmsSigBlueMatrixColumnTag, kcmsSigGreenColorantTag, kcmsSigGreenMatrixColumnTag, kcmsSigLuminanceTag, kcmsSigMediaBlackPointTag, kcmsSigMediaWhitePointTag, kcmsSigRedColorantTag and kcmsSigRedMatrixColumnTag.

Some examples using this method:

LCMS2ProfileMBS.WriteColorantOrder(data as Memoryblock) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes colorant order.

For kcmsSigColorantOrderTag.
Data should be 16 byte long.
Returns true on success or false on failure.

LCMS2ProfileMBS.WriteDate(tag as Integer, o as LCMS2DateMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes date tag.

Works with kcmsSigCalibrationDateTimeTag and kcmsSigDateTimeTag.

LCMS2ProfileMBS.WriteDict(tag as Integer, o as LCMS2DictionaryMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes Dictionary tag.

Works with kcmsSigMetaTag.

Next items

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


The biggest plugin in space...