Platforms to show: All Mac Windows Linux Cross-Platform
CGColorSpaceMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
- 8 properties
- property BaseColorSpace as CGColorSpaceMBS
- property ColorTableCount as Integer
- property Description as String
- property Handle as Integer
- property Model as Integer
- property ModelText as String
- property Name as String
- property NumberOfComponents as Integer
- method ICCProfile as string
- 26 shared methods
- shared method CreateCalibratedGray(whitePoint() as Double, blackPoint() as Double, gamma as Double) as CGColorSpaceMBS
- shared method CreateCalibratedRGB(whitePoint() as Double, blackPoint() as Double, gamma() as Double, matrix() as Double) as CGColorSpaceMBS
- shared method CreateDeviceCMYK as CGColorSpaceMBS
- shared method CreateDeviceGray as CGColorSpaceMBS
- shared method CreateDeviceRGB as CGColorSpaceMBS
- shared method CreateLab(whitePoint() as Double, blackPoint() as Double, range() as Double) as CGColorSpaceMBS
- shared method CreatePattern(baseSpace as CGColorSpaceMBS) as CGColorSpaceMBS
- shared method CreateWithHandle(Handle as Integer) as CGColorSpaceMBS
- shared method CreateWithICCProfile(ICCProfileData as memoryblock) as CGColorSpaceMBS
- shared method CreateWithICCProfile(ICCProfileData as string) as CGColorSpaceMBS
- shared method CreateWithName(name as string) as CGColorSpaceMBS
- shared method CreateWithPlatformColorSpace(Handle as Integer) as CGColorSpaceMBS
- shared method kCGColorSpaceACESCGLinear as string
- shared method kCGColorSpaceAdobeRGB1998 as string
- shared method kCGColorSpaceDCIP3 as string
- shared method kCGColorSpaceDisplayP3 as string
- shared method kCGColorSpaceGenericCMYK as string
- shared method kCGColorSpaceGenericGray as string
- shared method kCGColorSpaceGenericGrayGamma2_2 as string
- shared method kCGColorSpaceGenericRGB as string
- shared method kCGColorSpaceGenericRGBLinear as string
- shared method kCGColorSpaceGenericXYZ as string
- shared method kCGColorSpaceITUR_2020 as string
- shared method kCGColorSpaceITUR_709 as string
- shared method kCGColorSpaceROMMRGB as string
- shared method kCGColorSpaceSRGB as string
- 13 constants
Constants
Constant | Value | Description |
---|---|---|
kCGColorSpaceModelCMYK | 2 |
One of the colorspace model constants.
A CMYK color space model. Available in Mac OS X v10.5 and later. |
kCGColorSpaceModelDeviceN | 4 |
One of the colorspace model constants.
A DeviceN color space model. Available in Mac OS X v10.5 and later. |
kCGColorSpaceModelIndexed | 5 |
One of the colorspace model constants.
An indexed color space model. Available in Mac OS X v10.5 and later. |
kCGColorSpaceModelLab | 3 |
One of the colorspace model constants.
A Lab color space model. Available in Mac OS X v10.5 and later. |
kCGColorSpaceModelMonochrome | 0 |
One of the colorspace model constants.
A monochrome color space model. Available in Mac OS X v10.5 and later. |
kCGColorSpaceModelPattern | 6 |
One of the colorspace model constants.
A pattern color space model. Available in Mac OS X v10.5 and later. |
kCGColorSpaceModelRGB | 1 |
One of the colorspace model constants.
An RGB color space model. Available in Mac OS X v10.5 and later. |
kCGColorSpaceModelUnknown | -1 |
One of the colorspace model constants.
An unknown color space model. Available in Mac OS X v10.5 and later. |
kCGRenderingIntentAbsoluteColorimetric | 1 |
One of the color rendering intents constants.
Map colors outside of the gamut of the output device to the closest possible match inside the gamut of the output device. This can produce a clipping effect, where two different color values in the gamut of the graphics context are mapped to the same color value in the output device's gamut. Unlike the relative colorimetric, absolute colorimetric does not modify colors inside the gamut of the output device. |
kCGRenderingIntentDefault | 0 |
One of the color rendering intents constants.
The default rendering intent for the graphics context. |
kCGRenderingIntentPerceptual | 3 |
One of the color rendering intents constants.
Preserve the visual relationship between colors by compressing the gamut of the graphics context to fit inside the gamut of the output device. Perceptual intent is good for photographs and other complex, detailed images. |
kCGRenderingIntentRelativeColorimetric | 2 |
One of the color rendering intents constants.
Map colors outside of the gamut of the output device to the closest possible match inside the gamut of the output device. This can produce a clipping effect, where two different color values in the gamut of the graphics context are mapped to the same color value in the output device's gamut. The relative colorimetric shifts all colors (including those within the gamut) to account for the difference between the white point of the graphics context and the white point of the output device. |
kCGRenderingIntentSaturation | 4 |
One of the color rendering intents constants.
Preserve the relative saturation value of the colors when converting into the gamut of the output device. The result is an image with bright, saturated colors. Saturation intent is good for reproducing images with low detail, such as presentation charts and graphs. |
This class has no sub classes.
Some useful global functions for this class:
- CGBitmapContextCreateMBS(data as memoryblock, width as Integer, height as Integer, bitsPerComponent as Integer, bytesPerRow as Integer, colorspace as CGColorSpaceMBS, alphaInfo as Integer) as CGBitmapContextMBS
- CGShadingCreateAxialMBS(colorspace as CGColorSpaceMBS, startPoint as CGPointMBS, endPoint as CGPointMBS, func as CGFunctionMBS, extendStart as boolean, extendEnd as boolean) as CGShadingMBS
- CGShadingCreateRadialMBS(colorspace as CGColorSpaceMBS, startPoint as CGPointMBS, startRadius as Double, endPoint as CGPointMBS, endRadius as Double, func as CGFunctionMBS, extendStart as boolean, extendEnd as boolean) as CGShadingMBS
- NewCIContextMBS(cgcontext as CGContextMBS, OutputColorSpace as CGColorSpaceMBS, WorkingColorSpace as CGColorSpaceMBS, UseSoftwareRenderer as Boolean) as CIContextMBS
- NewCIImagewithBitmapDataMBS(data as memoryblock, BytesPerRow as Integer, Width as Integer, Height as Integer, Format as Integer, colorspace as CGColorSpaceMBS) as CIImageMBS
- NewCIImagewithBitmapMemoryMBS(data as memoryblock, DataLength as Integer, BytesPerRow as Integer, Width as Integer, Height as Integer, Format as Integer, colorspace as CGColorSpaceMBS) as CIImageMBS
- NewCIImagewithCGImageMBS(cgimage as CGImageMBS, cgcolorspace as CGColorSpaceMBS) as CIImageMBS
- NewCIImagewithDataMBS(Data as memoryblock, cgcolorspace as CGColorSpaceMBS) as CIImageMBS
- NewCIImagewithFileMBS(file as folderitem, cgcolorspace as CGColorSpaceMBS) as CIImageMBS
- NewCIImagewithURLMBS(url as String, cgcolorspace as CGColorSpaceMBS) as CIImageMBS
Some methods using this class:
- CGBitmapContextMBS.Create(data as memoryblock, width as Integer, height as Integer, bitsPerComponent as Integer, bytesPerRow as Integer, colorspace as CGColorSpaceMBS, alphaInfo as Integer) as CGBitmapContextMBS
- CGGradientMBS.CreateWithColorComponents(colorSpace as CGColorSpaceMBS, components() as Double, locations() as Double) as CGGradientMBS
- CGGradientMBS.CreateWithColors(colorSpace as CGColorSpaceMBS, colors() as CGColorMBS) as CGGradientMBS
- CGImageMBS.CopyWithColorSpace(profile as CGColorSpaceMBS) as CGImageMBS
- CGImageMBS.Picture(ColorSpace as CGColorSpaceMBS = nil) as Picture
- CIContextMBS.TIFFRepresentationOfImage(Image as CIImageMBS, format as Integer = 24, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil) as MemoryBlock
- CIContextMBS.writeJPEGRepresentationOfImage(Image as CIImageMBS, file as FolderItem, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil, byref error as NSErrorMBS) as Boolean
- CIImageMBS.Constructor(data as memoryblock, cgcolorspace as CGColorSpaceMBS)
- CIImageMBS.Constructor(file as FolderItem, cgcolorspace as CGColorSpaceMBS)
- CIImageMBS.imageWithContentsOfFileMT(file as folderitem, colorspace as CGColorSpaceMBS) as CIImageMBS
Some properties using for this class:
- CGBitmapContextMBS.BitmapColorSpace as CGColorSpaceMBS
- CGColorSpaceMBS.BaseColorSpace as CGColorSpaceMBS
- CGDisplayMBS.ColorSpace as CGColorSpaceMBS
- CGImageMBS.ColorSpace as CGColorSpaceMBS
- CIColorMBS.ColorSpace as CGColorSpaceMBS
- CIFilterColorCubesMixedWithMaskMBS.inputColorSpace as CGColorSpaceMBS
- CIFilterColorCubeWithColorSpaceMBS.inputColorSpace as CGColorSpaceMBS
- CIFilterColorCurvesMBS.inputColorSpace as CGColorSpaceMBS
- CIImageMBS.colorSpace as CGColorSpaceMBS
- DesktopWindow.CGColorSpaceMBS as CGColorSpaceMBS
Some examples using this class:
- /AVFoundation/AVVideoWall
- /AVFoundation/Screen Input
- /AVFoundation/Still Photos
- /Images/JPEG/JPEG with LCMS/JPEG with LCMS
- /Images/JPEG/PNG to JPEG with ICC Profile
- /Images/LCMS2/Drawing on Mac with Colorspaces/Drawing on Mac with Colorspaces
- /MacCG/CGGradient test
- /MacCG/CGImage with different color spaces
- /MacCG/Mac ColorSpace tests
- /MacCG/Quartz Gradients
Blog Entries
- MBS Xojo Plugins, version 19.3pr5
- Colorspaces in Xojo
- Colorspaces in MacOS with Xojo
- MBS Xojo / Real Studio Plugins, version 15.4pr7
- Tip of day: Load ICC profile on OS X for any image format with CGImageSource
- MBS Xojo / Real Studio Plugins, version 15.0pr5
- MBS Xojo / Real Studio plug-ins in version 13.4
- Notes from this week
- MBS REALbasic Plugins Version 10.4 release notes
- MBS REALbasic plug-ins version 9.5
Release notes
- Version 19.3
- Changed Picture.CGColorSpaceMBS function to return default Generic RGB colorspace used by Xojo if no other is set for picture.
The items on this page are in the following plugins: MBS MacCG Plugin.