Platforms to show: All Mac Windows Linux Cross-Platform
Back to CIContextMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This also runs the garbage collector.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Great to create a context and render something inside.
See also:
CIContextMBS.Constructor(cgcontext as CGContextMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
On success, the handle is not zero.
See also:
CIContextMBS.Constructor(cgcontext as CGContextMBS, OutputColorSpace as CGColorSpaceMBS, WorkingColorSpace as CGColorSpaceMBS, UseSoftwareRenderer as Boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
OutputColorSpace: A CGColorSpaceMBS object defining the color space in which all intermediate operations are performed.
WorkingColorSpace: A CGColorSpaceRef object defining the color space that images are converted to before rendering into the context.
UseSoftwareRenderer: Whether you want software renderer only.
On success, the handle is not zero.
See also:
CIContextMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 12.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
ref should be a CIContext* and the object is retained.
Raises UnsupportedOperationException if object is not a CIContext.
See also:
CIContextMBS.Constructor(Pic as Picture)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Works only on Cocoa target.
See also:
CIContextMBS.CreateCGImage(image as CIImageMBS, r as CGRectMBS = nil) as CGImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Render the region 'r' of image 'im' into a temporary buffer using the context, then create and return a new CoreGraphics image with the results.
If r is nil, the whole image extent is used.
See also:
CIContextMBS.CreateCGImage(image as CIImageMBS, r as CGRectMBS, ColorSpace as CGColorSpaceMBS) as CGImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Render the region 'r' of image 'im' into a temporary buffer using the context, then create and return a new CoreGraphics image with the results.
If r is nil, the whole image extent is used.
See also:
CIContextMBS.createCGLayer(size as CGSizeMBS, info as dictionary = nil) as CGLayerMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
size: The size, in default user space units, of the layer relative to the graphics context.
ifno: A dictionary, which is passed to CGLayerCreateWithContext as the auxiliaryInfo parameter. Pass nil because this parameter is reserved for future use.
Returns a CGLayer object.
After calling this method, Core Image draws content into the CGLayer object. Core Image creates a CGLayer object by calling the Quartz 2D function CGLayerCreateWithContext, whose prototype is:
CGLayerRef CGLayerCreateWithContext (
CGContextRef context,
CGSize size,
CFDictionaryRef auxiliaryInfo
);
Core Image passes the CIContext object as the context parameter, the size as the size parameter, and the dictionary as the auxiliaryInfo parameter. For more information on CGLayer objects, see Quartz 2D Programming Guide and CGLayer Reference.
Available in OS X v10.4 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CIContextMBS.DrawImage(ciImage as CIImageMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Rendering the image will cause the calculations to be done so this call is quite expensive.
CIContextMBS.DrawImagePoint(ciImage as CIImageMBS, DestPoint as CGPointMBS, SourceRect as CGRectMBS = nil) Deprecated
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Rendering the image will cause the calculations to be done so this call is quite expensive.
If SourceRect is nil, we use the extent from image.
CIContextMBS.DrawImageRect(ciImage as CIImageMBS, DestRect as CGRectMBS, SourceRect as CGRectMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Rendering the image will cause the calculations to be done so this call is quite expensive.
If SourceRect is nil, we use the extent from image.
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CIContextMBS.HEIFRepresentationOfImage(Image as CIImageMBS, format as Integer = 24, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil) as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 19.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome and must match the specified format.
No options keys are supported at this time.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.13 or later.
CIContextMBS.JPEGRepresentationOfImage(Image as CIImageMBS, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil) as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome.
Supported options keys are kCGImageDestinationLossyCompressionQuality, kCIImageRepresentationAVDepthData, kCIImageRepresentationDepthImage, kCIImageRepresentationDisparityImage.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.12 or later.
CIContextMBS.PNGRepresentationOfImage(Image as CIImageMBS, format as Integer = 24, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil) as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome and must match the specified format.
No options keys are supported at this time.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.13 or later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 7.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Runs the context's garbage collector to reclaim any resources that are no longer required (e.g. removes textures from the texture cache that reference deleted images.) This method is called automatically after every rendering operation.
CIContextMBS.TIFFRepresentationOfImage(Image as CIImageMBS, format as Integer = 24, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil) as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome and must match the specified format.
No options keys are supported at this time.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.12 or later.
CIContextMBS.writeHEIFRepresentationOfImage(Image as CIImageMBS, file as FolderItem, format as Integer = 24, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil, byref error as NSErrorMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 19.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome and must match the specified format.
No options keys are supported at this time.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.13 or later.
CIContextMBS.writeJPEGRepresentationOfImage(Image as CIImageMBS, file as FolderItem, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil, byref error as NSErrorMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome.
Supported options keys are kCGImageDestinationLossyCompressionQuality, kCIImageRepresentationAVDepthData, kCIImageRepresentationDepthImage, kCIImageRepresentationDisparityImage.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.12 or later.
CIContextMBS.writePNGRepresentationOfImage(Image as CIImageMBS, file as FolderItem, format as Integer = 24, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil, byref error as NSErrorMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome and must match the specified format.
No options keys are supported at this time.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.13 or later.
CIContextMBS.writeTIFFRepresentationOfImage(Image as CIImageMBS, file as FolderItem, format as Integer = 24, colorSpace as CGColorSpaceMBS = nil, options as dictionary = nil, byref error as NSErrorMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | CoreImage | MBS MacCI Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Image must have a finite non-empty extent.
The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome and must match the specified format.
No options keys are supported at this time.
If colorspace is nil, we use generic RGB colorspace.
Available on macOS 10.12 or later.
The items on this page are in the following plugins: MBS MacCI Plugin.