Platforms to show: All Mac Windows Linux Cross-Platform

Back to LCMS2ProfileMBS class.

Previous items

LCMS2ProfileMBS.WriteICCData(tag as Integer, o as LCMS2ICCDataMBS) as boolean

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

Works with kcmsSigDataTag, kcmsSigPs2CRD0Tag, kcmsSigPs2CRD1Tag, kcmsSigPs2CRD2Tag, kcmsSigPs2CRD3Tag, kcmsSigPs2CSATag and kcmsSigPs2RenderingIntentTag.

LCMS2ProfileMBS.WriteICCMeasurementConditions(value as LCMS2ICCMeasurementConditionsMBS) as boolean

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

for kcmsSigMeasurementTag.
Writes data and returns true on success or false on failure.

LCMS2ProfileMBS.WriteICCViewingConditions(o as LCMS2ICCViewingConditionsMBS) as boolean

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

Works with kcmsSigViewingConditionsTag.

LCMS2ProfileMBS.WriteMLU(tag as Integer, o as LCMS2MLUMBS) as boolean

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

Works with kcmsSigCharTargetTag, kcmsSigCopyrightTag, kcmsSigDeviceMfgDescTag, kcmsSigDeviceModelDescTag, kcmsSigProfileDescriptionTag, kcmsSigScreeningDescTag and kcmsSigViewingCondDescTag.

Some examples using this method:

LCMS2ProfileMBS.WriteNamedColorList(tag as Integer, o as LCMS2NamedColorListMBS) as boolean

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

Works with kcmsSigColorantTableTag, kcmsSigColorantTableOutTag, kcmsSigCrdInfoTag and kcmsSigNamedColor2Tag.

Some examples using this method:

LCMS2ProfileMBS.WritePipeline(tag as Integer, o as LCMS2PipelineMBS) as boolean

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

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

Some examples using this method:

LCMS2ProfileMBS.WriteRawTag(sig as Integer, data as Memoryblock) as boolean

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

The RAW version does the same as WriteTag* but without any interpretation of the data. Please note it is fair easy to deal with "cooked" structures, since there are primitives for allocating, deleting and modifying data. For RAW data you are responsible of everything. If you want to deal with a private tag, you may want to write a plug-in instead of messing up with raw data.

sig: Signature of tag to be written
data: memory block holding the data.

Returns true on success, false on 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.

Some examples using this method:

LCMS2ProfileMBS.WriteScreening(o as LCMS2ScreeningMBS) as boolean

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

Works with kcmsSigScreeningTag.

LCMS2ProfileMBS.WriteSequence(tag as Integer, o as LCMS2SequenceMBS) as boolean

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

Only for kcmsSigProfileSequenceDescTag and kcmsSigProfileSequenceIdTag.

LCMS2ProfileMBS.WriteSignature(tag as Integer, o as UInt32) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes a signature tag with the given values.

Works with kcmsSigColorimetricIntentImageStateTag, kcmsSigPerceptualRenderingIntentGamutTag, kcmsSigSaturationRenderingIntentGamutTag or kcmsSigTechnologyTag.

LCMS2ProfileMBS.WriteToneCurve(tag as Integer, o as LCMS2ToneCurveMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method LCMS2 MBS Images Plugin 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Writes tone curve tag.
Example
// read a profile
dim f as FolderItem = SpecialFolder.Desktop.Child("myprofile.icc")
dim p as LCMS2ProfileMBS = LCMS2ProfileMBS.OpenProfileFromFile(f)

// find gray level tone curve
dim t as LCMS2ToneCurveMBS = p.ReadToneCurve(LCMS2MBS.kcmsSigGrayTRCTag)
if t<>nil then

// let's make a new one with half of old values
dim values(1000) as single

for i as Integer = 0 to 1000
values(i) = t.EvalToneCurveFloat(i/1000.0) * 0.5
next

// build new curve with that values
dim n as LCMS2ToneCurveMBS = LCMS2ToneCurveMBS.BuildTabulatedToneCurve(nil, values)

// write back
if not p.WriteToneCurve(LCMS2MBS.kcmsSigGrayTRCTag, n) then
MsgBox "failed to write tone curve"
end if
end if

// write profile
f = SpecialFolder.Desktop.Child("test.icc")
call p.SaveProfileToFile(f)

Works with kcmsSigBlueTRCTag, kcmsSigGrayTRCTag, kcmsSigGreenTRCTag and kcmsSigRedTRCTag.

Some examples using this method:

LCMS2ProfileMBS.WriteUcrBg(o as LCMS2UcrBgMBS) as boolean

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

Previous items

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


The biggest plugin in space...