Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Folderitem.ColorSyncCountImageProfilesMBS as Integer
Type Topic Version
method ColorSync
Function: Use this function to obtain a count of the number of embeded profiles for a given image.
Notes:
Returns 0 if the function fails for any reason.
Requires ColorSync 2.6 or newer.

Some examples which use this method:

Feedback, Comments & Corrections

Folderitem.ColorSyncEmbedImageMBS(target as folderitem,replace as boolean,Profile as ColorSyncProfileMBS) as boolean
Type Topic Version
method ColorSync
Function: This function will embed an image with an ICC profile.
Notes:
If target is a file, it specifies the resulting image. If this parameter is a folder, it specifies the location of the resulting image which will have the same name as the original file. If this parameter is nil, the original file is modified.
If a file with the same name already exists, it will be replaced if this parameter replace is set to true.
Returns false if the function fails for any reason.
Requires ColorSync 2.6 or newer.

Feedback, Comments & Corrections

Folderitem.ColorSyncGetImageProfileMBS(index as Integer) as ColorSyncProfileMBS
Type Topic Version
method ColorSync
Function: Use this function to obtain a specific embeded profile for a given image.
Notes:
Returns nil if the function fails for any reason.
Requires ColorSync 2.6 or newer.

Some examples which use this method:

Feedback, Comments & Corrections

Folderitem.ColorSyncImageColorSpaceMBS as string
Type Topic Version
method ColorSync
Function: What color space does this picture use?
Example:
dim file as FolderItem
msgbox file.ColorSyncImageColorSpaceMBS
Notes:
Possible values:

"XYZ "The XYZ data color space.
"Lab "The L*a*b* data color space.
"Luv "The L*u*v* data color space.
"Yxy "The Yxy data color space.
"RGB "The RGB data color space.
"sRGB"The RGB data color space.
"GRAY"The Gray data color space.
"HSV "The HSV data color space.
"HLS "The HLS data color space.
"CMYK"The CMYK data color space.
"CMY "The CMY data color space.
"MCH5"The five-channel multichannel (HiFi) data color space.
"MCH6"The six-channel multichannel (HiFi) data color space.
"MCH7"The seven-channel multichannel (HiFi) data color space.
"MCH8"The eight-channel multichannel (HiFi) data color space.

Other values whitout a defition from Apple:

"3CLR", "4CLR", "5CLR", "6CLR", "7CLR", "8CLR", "NAME", "9CLR", "ACLR", "BCLR", "CCLR", "DCLR", "ECLR", "FCLR".

Requires ColorSync 2.6 or newer.

Some examples which use this method:

Feedback, Comments & Corrections

Folderitem.ColorSyncLinkImageMBS(target as folderitem,replace as boolean,quality as Integer,linkprofile as ColorSyncProfileMBS,linkintent as Integer) as boolean
Type Topic Version
method ColorSync
Function: Use this function to match an image file with a device link profile.
Notes:
If target is a file, it specifies the resulting image. If this parameter is a folder, it specifies the location of the resulting image which will have the same name as the original file. If this parameter is nil, the original file is modified.
If a file with the same name already exists, it will be replaced if this parameter replace is set to true.
Returns false if the function fails for any reason.

Quality values:
cmNormalMode0This is the default setting. Normal mode indicates that the CMM should use its default method to compromise between performance and resource requirements.
cmDraftMode1Draft mode indicates that the CMM should sacrifice quality, if necessary, to minimize resource requirements. Note that the default CMM currently produces the same results for both normal and draft mode.
cmBestMode2Best mode indicates that the CMM should maximize resource usage to ensure the highest possible quality.

Intent values:
cmPerceptual0All the colors of a given gamut can be scaled to fit within another gamut. This intent is best suited to realistic images, such as photographic images.
cmRelativeColorimetric1The colors that fall within the gamuts of both devices are left unchanged. This intent is best suited to logo images.
cmSaturation2The relative saturation of colors is maintained from gamut to gamut. This intent is best suited to bar graphs and pie charts in which the actual color displayed is less important than its vividness.
cmAbsoluteColorimetric3This approach is based on a device-independent color space in which the result is an idealized print viewed on a ideal type of paper having a large dynamic range and color gamut.

Requires ColorSync 2.6 or newer.

Feedback, Comments & Corrections

Folderitem.ColorSyncMatchImageMBS(target as folderitem,replace as boolean,quality as Integer,sourceprofile as ColorSyncProfileMBS,sourceintent as Integer,destprofile as ColorSyncProfileMBS) as boolean
Type Topic Version
method ColorSync
Function: Use this function to color match an image file.
Example:
dim f,gg as FolderItem
dim fo,fi as FolderItem
dim ip,op as ColorSyncProfileMBS
dim cw as ColorSyncWorldMBS
dim b as Boolean

gg=SpecialFolder.Desktop.truechild("aaa")
f=SpecialFolder.Desktop.Child("mädchen2.tif")

fo=GetFolderItem("Generic RGB Profile.icc")
fi=GetFolderItem("Generic CMYK Profile.icc")

ip = fi.OpenAsColorSyncProfileMBS
op = fo.OpenAsColorSyncProfileMBS
cw = new ColorSyncWorldMBS(ip,op)

b=f.ColorSyncMatchImageMBS(gg,true,0,ip,0,op)

window1.backdrop=gg.openaspicture
Notes:
If target is a file, it specifies the resulting image. If this parameter is a folder, it specifies the location of the resulting image which will have the same name as the original file. If this parameter is nil, the original file is modified.
If a file with the same name already exists, it will be replaced if this parameter replace is set to true.
Returns false if the function fails for any reason.

Quality values:
cmNormalMode0This is the default setting. Normal mode indicates that the CMM should use its default method to compromise between performance and resource requirements.
cmDraftMode1Draft mode indicates that the CMM should sacrifice quality, if necessary, to minimize resource requirements. Note that the default CMM currently produces the same results for both normal and draft mode.
cmBestMode2Best mode indicates that the CMM should maximize resource usage to ensure the highest possible quality.

Intent values:
cmPerceptual0All the colors of a given gamut can be scaled to fit within another gamut. This intent is best suited to realistic images, such as photographic images.
cmRelativeColorimetric1The colors that fall within the gamuts of both devices are left unchanged. This intent is best suited to logo images.
cmSaturation2The relative saturation of colors is maintained from gamut to gamut. This intent is best suited to bar graphs and pie charts in which the actual color displayed is less important than its vividness.
cmAbsoluteColorimetric3This approach is based on a device-independent color space in which the result is an idealized print viewed on a ideal type of paper having a large dynamic range and color gamut.

Requires ColorSync 2.6 or newer.

Feedback, Comments & Corrections

Folderitem.ColorSyncProofImageMBS(target as folderitem,replace as boolean,quality as Integer,sourceprofile as ColorSyncProfileMBS,sourceintent as Integer,destprofile as ColorSyncProfileMBS,proofprofile as ColorSyncProfileMBS) as boolean
Type Topic Version
method ColorSync
Function: Use this function to proof an image file.
Notes:
If target is a file, it specifies the resulting image. If this parameter is a folder, it specifies the location of the resulting image which will have the same name as the original file. If this parameter is nil, the original file is modified.
If a file with the same name already exists, it will be replaced if this parameter replace is set to true.
Returns false if the function fails for any reason.

Quality values:
cmNormalMode0This is the default setting. Normal mode indicates that the CMM should use its default method to compromise between performance and resource requirements.
cmDraftMode1Draft mode indicates that the CMM should sacrifice quality, if necessary, to minimize resource requirements. Note that the default CMM currently produces the same results for both normal and draft mode.
cmBestMode2Best mode indicates that the CMM should maximize resource usage to ensure the highest possible quality.

Intent values:
cmPerceptual0All the colors of a given gamut can be scaled to fit within another gamut. This intent is best suited to realistic images, such as photographic images.
cmRelativeColorimetric1The colors that fall within the gamuts of both devices are left unchanged. This intent is best suited to logo images.
cmSaturation2The relative saturation of colors is maintained from gamut to gamut. This intent is best suited to bar graphs and pie charts in which the actual color displayed is less important than its vividness.
cmAbsoluteColorimetric3This approach is based on a device-independent color space in which the result is an idealized print viewed on a ideal type of paper having a large dynamic range and color gamut.

Requires ColorSync 2.6 or newer.

Feedback, Comments & Corrections

Folderitem.ColorSyncSetImageProfileMBS(target as folderitem,replace as boolean,index as Integer,profile as ColorSyncProfileMBS) as boolean
Type Topic Version
method ColorSync
Function: Use this function to set a specific embeded profile for a given image.
Notes:
If target is a file, it specifies the resulting image. If this parameter is a folder, it specifies the location of the resulting image which will have the same name as the original file. If this parameter is nil, the original file is modified.
If a file with the same name already exists, it will be replaced if this parameter replace is set to true.
Returns false if the function fails for any reason.
Requires ColorSync 2.6 or newer.

Feedback, Comments & Corrections

Folderitem.ColorSyncUnembedImageMBS(target as folderitem,replace as boolean) as boolean
Type Topic Version
method ColorSync
Function: This function will remove any ICC profiles embeded in an image.
Notes:
If target is a file, it specifies the resulting image. If this parameter is a folder, it specifies the location of the resulting image which will have the same name as the original file. If this parameter is nil, the original file is modified.
If a file with the same name already exists, it will be replaced if this parameter replace is set to true.
Returns false if the function fails for any reason.
Requires ColorSync 2.6 or newer.

Feedback, Comments & Corrections

Folderitem.ColorSyncValidImageMBS as Integer
Type Topic Version
method ColorSync
Function: Is this a valid image for ColorSync?
Notes:
Return values:
0Windows
1No ColorSync 2.6 or newer
2Not valid
3Valid

You can look in the folder ColorSyncScriptingFolder which picture formates are supported. In Mac OS X 10.1.5 there are TIFF, JPEG and GIF.

(The ColorSyncScriptingFolder function is part of the MBS Plugin)

Requires ColorSync 2.6 or newer.

Some examples which use this method:

Feedback, Comments & Corrections




Links
MBS Xojo Plugins