MBS Plugin Documentation

Search:

Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchie

New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0

The list of the   themes,   classes,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

CMProfileMBS.AddTag(TagSignature as integer, data as string) as boolean
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Adds a tag to the profile.
Notes:
Data is used as a C String, so don't use chr(0) inside.
Returns false on any error.
CMProfileMBS.CalibrationDateTime as CMDateMBS
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns calibration data and time.
Notes: Nil on any error.
CMProfileMBS.ChannelCount as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 8.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The channel count for this profile.
Notes: Should be 3 for RGB and 4 for CMYK.
class CMProfileMBS
class, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: A class for a profile.
CMProfileMBS.close
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The destructor.
Notes:
There is no need to call this method except you want to free all resources used by this object now without waiting for Realbasic to do it for you.
(e.g. some Realbasic versions crash on Windows if there are plugin objects not closed.)
CMProfileMBS.ColorSpaceType as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The ColorSpace type of the profile.
Notes:
The list of Colorspace signatures:

SigXYZData&h58595A20L 'XYZ '
SigLabData&h4C616220L 'Lab '
SigLuvData&h4C757620L 'Luv '
SigYCbCrData&h59436272L 'YCbr'
SigYxyData&h59787920L 'Yxy '
SigRgbData&h52474220L 'RGB '
SigGrayData &h47524159L 'GRAY'
SigHsvData&h48535620L 'HSV '
SigHlsData&h484C5320L 'HLS '
SigCmykData &h434D594BL 'CMYK'
SigCmyData&h434D5920L 'CMY '
Sig2colorData&h32434C52L '2CLR'
Sig3colorData&h33434C52L '3CLR'
Sig4colorData&h34434C52L '4CLR'
Sig5colorData&h35434C52L '5CLR'
Sig6colorData&h36434C52L '6CLR'
Sig7colorData&h37434C52L '7CLR'
Sig8colorData&h38434C52L '8CLR'
Sig9colorData&h39434C52L '9CLR'
Sig10colorData&h41434C52L 'ACLR'
Sig11colorData&h42434C52L 'BCLR'
Sig12colorData&h43434C52L 'CCLR'
Sig13colorData&h44434C52L 'DCLR'
Sig14colorData&h45434C52L 'ECLR'
Sig15colorData&h46434C52L 'FCLR'
(Read and Write runtime property)
CMProfileMBS.Copyright as String
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The copyright string of the profile.
Notes: Value is "" on any error. Encoding is set to ASCII.
CMProfileMBS.CreationDateTime as CMDateMBS
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns creation data and time.
Notes: Nil on any error.
CMProfileMBS.Description as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The Description of the profile.
Notes: Value is "" on any error. Encoding is set to ASCII.
CMProfileMBS.DeviceClass as integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The DeviceClass of the profile.
Notes:
The Device class signatures:

SigInputClass&h73636E72'scnr'
SigDisplayClass&h6D6E7472'mntr'
SigOutputClass&h70727472'prtr'
SigLinkClass&h6C696E6B'link'
SigAbstractClass&h61627374'abst'
SigColorSpaceClass&h73706163'spac'
SigNamedColorClass&h6e6d636c'nmcl'
(Read and Write runtime property)
CMProfileMBS.File as folderitem
property, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The file where this profile was loaded from.
Notes: (Read and Write property)
CMProfileMBS.Handle as Integer
property, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The handle to the profile object.
Notes: (Read and Write property)
CMProfileMBS.HeaderAttributes as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The attributes field of the ICC profile header.
Notes: (Read and Write runtime property)
CMProfileMBS.HeaderFlags as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The flags field of the ICC profile header.
Notes: (Read and Write runtime property)
CMProfileMBS.Iluminant as CMPointMBS
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The Iluminant point.
Notes: Returns nil on any error.
CMProfileMBS.Info as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The Info string of the profile.
Notes: Value is "" on any error. Encoding is set to ASCII.
CMProfileMBS.IsIntentSupported(Intent as integer, UsedDirection as integer) as boolean
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: This one helps on inquiring if a determinate intent is supported by an opened profile.
Notes:
You must have a valid profile object, the intent and a parameter specifying how the profile would be used. The function does return true if intent is supported or false if not. If the intent is not supported, lcms will use default intent (usually perceptual).

Constants for Intent:
INTENT_PERCEPTUAL= 0
INTENT_RELATIVE_COLORIMETRIC= 1
INTENT_SATURATION= 2
INTENT_ABSOLUTE_COLORIMETRIC= 3

Direction:
LCMS_USED_AS_INPUT= 0
LCMS_USED_AS_OUTPUT= 1
LCMS_USED_AS_PROOF= 2

Returns:
True if intent is supported or false if not.
If the intent is not supported, lcms will use default intent (usually perceptual).
CMProfileMBS.IsTagPresent(tag as integer) as boolean
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns true if the given tag is found in the tag list.
Notes: Returns false on any error.
CMProfileMBS.Manufacturer as String
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The manufacturer string of the profile.
Notes: Value is "" on any error. Encoding is set to ASCII.
CMProfileMBS.MediaBlackPoint as CMPointMBS
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The media black point.
Example:
// find system profile and get black point
dim displayProfile as folderitem
If TargetMacOS Then
displayProfile = GetSystemColorSyncProfileMBS.Location.Path
Else
displayProfile = GetWindowsColorProfileMBS
End if
dim profile as CMProfileMBS = CMOpenProfileFromFileMBS(displayProfile)
dim wp as CMPointMBS = profile.MediaBlackPoint

Notes:
Returns nil on any error.
(not all profile versions define this tag.)
(Read and Write runtime property)
CMProfileMBS.MediaWhitePoint as CMPointMBS
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The media white point.
Example:
// find system profile and get white point
dim displayProfile as folderitem
If TargetMacOS Then
displayProfile = GetSystemColorSyncProfileMBS.Location.Path
Else
displayProfile = GetWindowsColorProfileMBS
End if
dim profile as CMProfileMBS = CMOpenProfileFromFileMBS(displayProfile)
dim wp as CMPointMBS = profile.MediaWhitePoint

Notes:
Returns nil on any error.
(not all profile versions define this tag.)
(Read and Write runtime property)
CMProfileMBS.Model as String
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The model string of the profile.
Notes: Value is "" on any error. Encoding is set to ASCII.
CMProfileMBS.name as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The name of the profile.
Notes: Value is "" on any error. Encoding is set to ASCII.
CMProfileMBS.PCS as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The PCS field used in the Profile header.
Notes: (Read and Write runtime property)
CMProfileMBS.PostScriptCRD(intent as integer, flags as integer=0) as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the profile as a PostScript CRD.
Notes:
Returns "" on any error.
Added flags parameter in plugin version 6.5.
CMProfileMBS.PostScriptCSA(intent as integer) as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the profile as a PostScript CSA.
Notes: Returns "" on any error.
CMProfileMBS.ProfileICCversion as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the ICC version as stated in the header of the profile.
Notes:
Examples values:
V2 profiles: &h2000000
V4 profiles: &h4000000
(Read and Write runtime property)
CMProfileMBS.ProfileID as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The 16-bytes profile ID (version 4 only).
Notes: (Read and Write runtime property)
CMProfileMBS.ProfileType as Integer
property, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The type of the profile.
Notes:
This value can be 0.
(Read and Write property)
CMProfileMBS.ReadICCGamma(icTagSignature as integer) as CMGammaMBS
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Reads a ICC Gamma object from the profile.
Example:
'get display profile
dim displayProfile as folderitem
If TargetMacOS Then
displayProfile = GetSystemColorSyncProfileMBS.Location.Path
Else
displayProfile = GetWindowsColorProfileMBS
End if
dim profile as CMProfileMBS = CMOpenProfileFromFileMBS(displayProfile)

'then whitepoint reference values & gamma for calculations
dim wp as CMPointMBS = profile.MediaWhitePoint

const icSigRedTRCTag=&h72545243
const icSigGreenTRCTag=&h67545243
const icSigBlueTRCTag=&h62545243
const icSigGrayTRCTag=&h6b545243

dim gammaTable as CMGammaMBS

gammaTable = profile.ReadICCGamma(icSigRedTRCTag)
if gammaTable<>nil then MsgBox "red gamma: "+str(gammaTable.EstimateGamma)

gammaTable = profile.ReadICCGamma(icSigGreenTRCTag)
if gammaTable<>nil then MsgBox "green gamma: "+str(gammaTable.EstimateGamma)

gammaTable = profile.ReadICCGamma(icSigBlueTRCTag)
if gammaTable<>nil then MsgBox "blue gamma: "+str(gammaTable.EstimateGamma)

gammaTable = profile.ReadICCGamma(icSigGrayTRCTag)
if gammaTable<>nil then MsgBox "gray gamma: "+str(gammaTable.EstimateGamma)

Notes: You need to pass the correct ic tag signature.
CMProfileMBS.ReadICCGammaReversed(icTagSignature as integer) as CMGammaMBS
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Reads a ICC Gamma object from the profile.
CMProfileMBS.RenderingIntent as integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The RenderingIntent of the profile.
Notes:
Modes:
0Perceptual
1Colorimetric
2Saturation
3Absolute
(Read and Write runtime property)
CMProfileMBS.SaveProfile(filename as folderitem) as boolean
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Saves the profile into a file.
Notes:
Returns false on any error.

Since version 8.7 the filename parameter is a folderitem instead of a string. Pass UnixPathMBS in older versions.
CMProfileMBS.SaveProfileToMemory as Memoryblock
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Saves the profile to a memoryblock.
Notes: Returns nil on any error.
CMProfileMBS.SaveProfileToString as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Saves the profile to a string.
Notes: Returns "" on any error.
CMProfileMBS.TagCount as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The number of tags in this profile.
Notes: Returns 0 on any error.
CMProfileMBS.TagMemory(index as integer) as memoryblock
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The Tag Data as a memoryblock.
Notes: Returns nil on any error.
CMProfileMBS.TagName(index as integer) as integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The tag signature for the tag with the given index.
Notes: Returns 0 on any error.
CMProfileMBS.TagSignature(index as integer) as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 6.5, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the tag signature of the tag with the given index.
Notes: Index is 0 based.
CMProfileMBS.TagSize(index as integer) as integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The size of the tag at the given index.
Notes: Returns 0 on any error.
CMProfileMBS.TagString(index as integer) as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: The Tag Data as a string.
Notes: Returns "" on any error.
CMProfileMBS.TargetDataMemory as memoryblock
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Retrieves the target data the profiler has used to build the profile.
Notes:
Usage of this tag is optional.
Returns nil on any error.
CMProfileMBS.TargetDataString as string
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Retrieves the target data the profiler has used to build the profile.
Notes:
Usage of this tag is optional.
Returns "" on any error.
CMProfileMBS.Version as Integer
method, LCMS, MBS LCMS Plugin (LCMS), class CMProfileMBS, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Returns the version value for this profile.
Notes: Returns 0 on any error.

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