Protocol

CIImageProcessorInput

A container of image data and information for use in a custom image processor.

Declaration

@protocol CIImageProcessorInput

Overview

Your app does not define classes that adopt this protocol; Core Image provides an object of this type when applying a custom image processor you create with a CIImageProcessorKernel subclass.

In your image processor class' processWithInputs:arguments:output:error: method, use the provided CIImageProcessorInput object to access the image data and supporting information to perform your custom image processing routine. For example, if you process the image using a Metal shader, use the metalTexture property to bind the image as an input texture. Or, if you process the image using a CPU-based routine, use the baseAddress property to access pixel data in memory.

To finish setting up or performing your image processing routine, use the provided CIImageProcessorOutput object to return processed pixel data to Core Image.

Topics

Accessing Input Image Data

baseAddress

A pointer to the image data in CPU memory to be processed.

Required.

metalTexture

A Metal texture containing the image data to be processed.

Required.

pixelBuffer

A CoreVideo pixel buffer containing the image data to be processed.

Required.

surface

An IOSurface object containing the image data to be processed.

Required.

Getting Supplemental Information for Image Processing

region

The area within the input image to be processed.

Required.

bytesPerRow

The number of bytes per row of pixels in the input image data.

Required.

format

The per-pixel data format of the image to be processed.

Required.

See Also

Custom Image Processors

CIImageProcessorKernel

The abstract class you extend to create custom image processors that can integrate with Core Image workflows.

CIImageProcessorOutput

A container for writing image data and information produced by a custom image processor.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software