One Logo Pool Ball
CoreImage · IOS API REFERENCE

CIContext

class · iOS 5.0+ · SDK 27.1

class CIContext

Members (50)

init · iOS 9.0+

init

TypeScript
static initCgContextOptions(cgctx: _CoreGraphics_CGContext, options?: (NativeMap<CIContextOption, unknown>) | null): CIContext
Swift declaration
init(cgContext cgctx: CGContext, options: [CIContextOption : Any]? = nil)
init · iOS 5.0+ · Deprecated in iOS 12.0

init

TypeScript
static initEaglContext(eaglContext: _OpenGLES_EAGLContext): CIContext
Swift declaration
init(eaglContext: EAGLContext)
init · iOS 5.0+ · Deprecated in iOS 12.0

init

TypeScript
static initEaglContextOptions(eaglContext: _OpenGLES_EAGLContext, options?: (NativeMap<CIContextOption, unknown>) | null): CIContext
Swift declaration
init(eaglContext: EAGLContext, options: [CIContextOption : Any]? = nil)
init · iOS 13.0+

init

TypeScript
static initMtlCommandQueue(commandQueue: SDKHandle): CIContext
Swift declaration
init(mtlCommandQueue commandQueue: any MTLCommandQueue)
init · iOS 13.0+

init

TypeScript
static initMtlCommandQueueOptions(commandQueue: SDKHandle, options?: (NativeMap<CIContextOption, unknown>) | null): CIContext
Swift declaration
init(mtlCommandQueue commandQueue: any MTLCommandQueue, options: [CIContextOption : Any]? = nil)
init · iOS 9.0+

init

TypeScript
static initMtlDevice(device: SDKHandle): CIContext
Swift declaration
init(mtlDevice device: any MTLDevice)
init · iOS 9.0+

init

TypeScript
static initMtlDeviceOptions(device: SDKHandle, options?: (NativeMap<CIContextOption, unknown>) | null): CIContext
Swift declaration
init(mtlDevice device: any MTLDevice, options: [CIContextOption : Any]? = nil)
method · iOS 15.0+

heif10Representation

TypeScript
heif10Representation(image: CIImage, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): ArrayBuffer
Swift declaration
func heif10Representation(of image: CIImage, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) throws -> Data
method · iOS 11.0+

heifRepresentation

TypeScript
heifRepresentation(image: CIImage, format: CIFormat, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): (ArrayBuffer) | null
Swift declaration
func heifRepresentation(of image: CIImage, format: CIFormat, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) -> Data?
method · iOS 10.0+

jpegRepresentation

TypeScript
jpegRepresentation(image: CIImage, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): (ArrayBuffer) | null
Swift declaration
func jpegRepresentation(of image: CIImage, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) -> Data?
method · iOS 17.0+

openEXRRepresentation

TypeScript
openEXRRepresentation(image: CIImage, options?: NativeMap<CIImageRepresentationOption, unknown>): ArrayBuffer
Swift declaration
func openEXRRepresentation(of image: CIImage, options: [CIImageRepresentationOption : Any] = [:]) throws -> Data
method · iOS 11.0+

pngRepresentation

TypeScript
pngRepresentation(image: CIImage, format: CIFormat, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): (ArrayBuffer) | null
Swift declaration
func pngRepresentation(of image: CIImage, format: CIFormat, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) -> Data?
method · iOS 10.0+

tiffRepresentation

TypeScript
tiffRepresentation(image: CIImage, format: CIFormat, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): (ArrayBuffer) | null
Swift declaration
func tiffRepresentation(of image: CIImage, format: CIFormat, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) -> Data?
method · iOS 26.0+

calculateHDRStats

TypeScript
calculateHDRStatsFor(cgimage: _CoreGraphics_CGImage): _CoreGraphics_CGImage
Swift declaration
func calculateHDRStats(for cgimage: CGImage) -> CGImage
method · iOS 26.0+

calculateHDRStats

TypeScript
calculateHDRStatsFor85938(buffer: _CoreVideo_CVBuffer): void
Swift declaration
func calculateHDRStats(for buffer: CVPixelBuffer)
method · iOS 26.0+

calculateHDRStats

TypeScript
calculateHDRStatsFor62120(surface: _IOSurface_IOSurfaceRef): void
Swift declaration
func calculateHDRStats(for surface: IOSurfaceRef)
method · iOS 26.0+

calculateHDRStats

TypeScript
calculateHDRStatsFor78106(image: CIImage): (CIImage) | null
Swift declaration
func calculateHDRStats(for image: CIImage) -> CIImage?
method · iOS 10.0+

clearCaches

TypeScript
clearCaches(): void
Swift declaration
func clearCaches()
method

createCGImage

TypeScript
createCGImageFrom(image: CIImage, fromRect: { x: number; y: number; width: number; height: number }): (_CoreGraphics_CGImage) | null
Swift declaration
func createCGImage(_ image: CIImage, from fromRect: CGRect) -> CGImage?
method

createCGImage

TypeScript
createCGImageFromFormatColorSpace(image: CIImage, fromRect: { x: number; y: number; width: number; height: number }, format: CIFormat, colorSpace?: (_CoreGraphics_CGColorSpace) | null): (_CoreGraphics_CGImage) | null
Swift declaration
func createCGImage(_ image: CIImage, from fromRect: CGRect, format: CIFormat, colorSpace: CGColorSpace?) -> CGImage?
method · iOS 10.0+

createCGImage

TypeScript
createCGImageFromFormatColorSpaceDeferred(image: CIImage, fromRect: { x: number; y: number; width: number; height: number }, format: CIFormat, colorSpace: (_CoreGraphics_CGColorSpace) | null, deferred: boolean): (_CoreGraphics_CGImage) | null
Swift declaration
func createCGImage(_ image: CIImage, from fromRect: CGRect, format: CIFormat, colorSpace: CGColorSpace?, deferred: Bool) -> CGImage?
method · iOS 26.0+

createCGImage

TypeScript
createCGImageFromFormatColorSpaceDeferredCalculateHDRStats(image: CIImage, fromRect: { x: number; y: number; width: number; height: number }, format: CIFormat, colorSpace: (_CoreGraphics_CGColorSpace) | null, deferred: boolean, calculateHDRStats: boolean): (_CoreGraphics_CGImage) | null
Swift declaration
func createCGImage(_ image: CIImage, from fromRect: CGRect, format: CIFormat, colorSpace: CGColorSpace?, deferred: Bool, calculateHDRStats: Bool) -> CGImage?
method · iOS 14.1+

depthBlurEffectFilter

TypeScript
depthBlurEffectFilterForDisparityImagePortraitEffectsMatteHairSemanticSegmentationGlassesMatteGainMapOrientationOptions(image: CIImage, disparityImage: CIImage, portraitEffectsMatte: (CIImage) | null, hairSemanticSegmentation: (CIImage) | null, glassesMatte: (CIImage) | null, gainMap: (CIImage) | null, orientation: _ImageIO_CGImagePropertyOrientation, options?: (NativeMap<unknown, unknown>) | null): (CIFilter) | null
Swift declaration
func depthBlurEffectFilter(for image: CIImage, disparityImage: CIImage, portraitEffectsMatte: CIImage?, hairSemanticSegmentation: CIImage?, glassesMatte: CIImage?, gainMap: CIImage?, orientation: CGImagePropertyOrientation, options: [AnyHashable : Any]? = nil) -> CIFilter?
method · iOS 13.0+

depthBlurEffectFilter

TypeScript
depthBlurEffectFilterForDisparityImagePortraitEffectsMatteHairSemanticSegmentationOrientationOptions(image: CIImage, disparityImage: CIImage, portraitEffectsMatte: (CIImage) | null, hairSemanticSegmentation: (CIImage) | null, orientation: _ImageIO_CGImagePropertyOrientation, options?: (NativeMap<unknown, unknown>) | null): (CIFilter) | null
Swift declaration
func depthBlurEffectFilter(for image: CIImage, disparityImage: CIImage, portraitEffectsMatte: CIImage?, hairSemanticSegmentation: CIImage?, orientation: CGImagePropertyOrientation, options: [AnyHashable : Any]? = nil) -> CIFilter?
method · iOS 12.0+

depthBlurEffectFilter

TypeScript
depthBlurEffectFilterForDisparityImagePortraitEffectsMatteOrientationOptions(image: CIImage, disparityImage: CIImage, portraitEffectsMatte: (CIImage) | null, orientation: _ImageIO_CGImagePropertyOrientation, options?: (NativeMap<unknown, unknown>) | null): (CIFilter) | null
Swift declaration
func depthBlurEffectFilter(for image: CIImage, disparityImage: CIImage, portraitEffectsMatte: CIImage?, orientation: CGImagePropertyOrientation, options: [AnyHashable : Any]? = nil) -> CIFilter?
method · iOS 12.0+

depthBlurEffectFilter

TypeScript
depthBlurEffectFilterForImageDataOptions(data: ArrayBuffer, options?: (NativeMap<unknown, unknown>) | null): (CIFilter) | null
Swift declaration
func depthBlurEffectFilter(forImageData data: Data, options: [AnyHashable : Any]? = nil) -> CIFilter?
method · iOS 12.0+

depthBlurEffectFilter

TypeScript
depthBlurEffectFilterForImageURLOptions(url: string, options?: (NativeMap<unknown, unknown>) | null): (CIFilter) | null
Swift declaration
func depthBlurEffectFilter(forImageURL url: URL, options: [AnyHashable : Any]? = nil) -> CIFilter?
method · iOS 5.0+

draw

TypeScript
draw(image: CIImage, inRect: { x: number; y: number; width: number; height: number }, fromRect: { x: number; y: number; width: number; height: number }): void
Swift declaration
func draw(_ image: CIImage, in inRect: CGRect, from fromRect: CGRect)
method · iOS 27.0+

estimateRender

TypeScript
estimateRender(image: CIImage, fromRect: { x: number; y: number; width: number; height: number }, destination: CIRenderDestination, atPoint: { x: number; y: number }): CIRenderTask
Swift declaration
func estimateRender(_ image: CIImage, from fromRect: CGRect, to destination: CIRenderDestination, at atPoint: CGPoint) throws -> CIRenderTask
init · iOS 5.0+

init

TypeScript
static init(): CIContext
Swift declaration
init()
init · iOS 5.0+

init

TypeScript
static initOptions(options?: (NativeMap<CIContextOption, unknown>) | null): CIContext
Swift declaration
init(options: [CIContextOption : Any]? = nil)
method · iOS 5.0+

inputImageMaximumSize

TypeScript
inputImageMaximumSize(): { width: number; height: number }
Swift declaration
func inputImageMaximumSize() -> CGSize
method · iOS 5.0+

outputImageMaximumSize

TypeScript
outputImageMaximumSize(): { width: number; height: number }
Swift declaration
func outputImageMaximumSize() -> CGSize
method · iOS 11.0+

prepareRender

TypeScript
prepareRender(image: CIImage, fromRect: { x: number; y: number; width: number; height: number }, destination: CIRenderDestination, atPoint: { x: number; y: number }): void
Swift declaration
func prepareRender(_ image: CIImage, from fromRect: CGRect, to destination: CIRenderDestination, at atPoint: CGPoint) throws
method · iOS 5.0+

render

TypeScript
renderToBitmapRowBytesBoundsFormatColorSpace(image: CIImage, data: SDKHandle, rowBytes: number, bounds: { x: number; y: number; width: number; height: number }, format: CIFormat, colorSpace?: (_CoreGraphics_CGColorSpace) | null): void
Swift declaration
func render(_ image: CIImage, toBitmap data: UnsafeMutableRawPointer, rowBytes: Int, bounds: CGRect, format: CIFormat, colorSpace: CGColorSpace?)
method · iOS 5.0+

render

TypeScript
renderTo(image: CIImage, buffer: _CoreVideo_CVBuffer): void
Swift declaration
func render(_ image: CIImage, to buffer: CVPixelBuffer)
method · iOS 5.0+

render

TypeScript
renderToBoundsColorSpace(image: CIImage, buffer: _CoreVideo_CVBuffer, bounds: { x: number; y: number; width: number; height: number }, colorSpace?: (_CoreGraphics_CGColorSpace) | null): void
Swift declaration
func render(_ image: CIImage, to buffer: CVPixelBuffer, bounds: CGRect, colorSpace: CGColorSpace?)
method · iOS 5.0+

render

TypeScript
renderToBoundsColorSpace89905(image: CIImage, surface: _IOSurface_IOSurfaceRef, bounds: { x: number; y: number; width: number; height: number }, colorSpace?: (_CoreGraphics_CGColorSpace) | null): void
Swift declaration
func render(_ image: CIImage, to surface: IOSurfaceRef, bounds: CGRect, colorSpace: CGColorSpace?)
method · iOS 9.0+

render

TypeScript
renderToCommandBufferBoundsColorSpace(image: CIImage, texture: SDKHandle, commandBuffer: (SDKHandle) | null, bounds: { x: number; y: number; width: number; height: number }, colorSpace: _CoreGraphics_CGColorSpace): void
Swift declaration
func render(_ image: CIImage, to texture: any MTLTexture, commandBuffer: (any MTLCommandBuffer)?, bounds: CGRect, colorSpace: CGColorSpace)
method · iOS 11.0+

startTask

TypeScript
startTaskToClear(destination: CIRenderDestination): CIRenderTask
Swift declaration
func startTask(toClear destination: CIRenderDestination) throws -> CIRenderTask
method · iOS 11.0+

startTask

TypeScript
startTaskToRenderFromToAt(image: CIImage, fromRect: { x: number; y: number; width: number; height: number }, destination: CIRenderDestination, atPoint: { x: number; y: number }): CIRenderTask
Swift declaration
func startTask(toRender image: CIImage, from fromRect: CGRect, to destination: CIRenderDestination, at atPoint: CGPoint) throws -> CIRenderTask
method · iOS 11.0+

startTask

TypeScript
startTaskToRenderTo(image: CIImage, destination: CIRenderDestination): CIRenderTask
Swift declaration
func startTask(toRender image: CIImage, to destination: CIRenderDestination) throws -> CIRenderTask
method · iOS 15.0+

writeHEIF10Representation

TypeScript
writeHEIF10Representation(image: CIImage, url: string, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): void
Swift declaration
func writeHEIF10Representation(of image: CIImage, to url: URL, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) throws
method · iOS 11.0+

writeHEIFRepresentation

TypeScript
writeHEIFRepresentation(image: CIImage, url: string, format: CIFormat, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): void
Swift declaration
func writeHEIFRepresentation(of image: CIImage, to url: URL, format: CIFormat, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) throws
method · iOS 10.0+

writeJPEGRepresentation

TypeScript
writeJPEGRepresentation(image: CIImage, url: string, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): void
Swift declaration
func writeJPEGRepresentation(of image: CIImage, to url: URL, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) throws
method · iOS 17.0+

writeOpenEXRRepresentation

TypeScript
writeOpenEXRRepresentation(image: CIImage, url: string, options?: NativeMap<CIImageRepresentationOption, unknown>): void
Swift declaration
func writeOpenEXRRepresentation(of image: CIImage, to url: URL, options: [CIImageRepresentationOption : Any] = [:]) throws
method · iOS 11.0+

writePNGRepresentation

TypeScript
writePNGRepresentation(image: CIImage, url: string, format: CIFormat, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): void
Swift declaration
func writePNGRepresentation(of image: CIImage, to url: URL, format: CIFormat, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) throws
method · iOS 10.0+

writeTIFFRepresentation

TypeScript
writeTIFFRepresentation(image: CIImage, url: string, format: CIFormat, colorSpace: _CoreGraphics_CGColorSpace, options?: NativeMap<CIImageRepresentationOption, unknown>): void
Swift declaration
func writeTIFFRepresentation(of image: CIImage, to url: URL, format: CIFormat, colorSpace: CGColorSpace, options: [CIImageRepresentationOption : Any] = [:]) throws
get · iOS 9.0+

workingColorSpace

TypeScript
get workingColorSpace(): (_CoreGraphics_CGColorSpace) | null
Swift declaration
var workingColorSpace: CGColorSpace? { get }
get · iOS 9.0+

workingFormat

TypeScript
get workingFormat(): CIFormat
Swift declaration
var workingFormat: CIFormat { get }

Skipped declarations

No declarations were skipped in this snapshot.

All CoreImage types →