Contents

process(with:arguments:outputs:)

Override this class method of your Core Image Processor Kernel subclass if it needs to produce multiple outputs.

Declaration

class func process(with inputs: [any CIImageProcessorInput]?, arguments: [String : Any]?, outputs: [any CIImageProcessorOutput]) throws

Parameters

  • inputs:

    An array of id<CIImageProcessorInput> that the class consumes to produce its output. The input.region may be larger than the rect returned by Roi(forinput:arguments:outputrect:).

  • arguments:

    The arguments dictionary that was passed to Apply(withextent:inputs:arguments:).

  • outputs:

    An array id<CIImageProcessorOutput> that the CIImageProcessorKernel must provide results to.

Discussion

This supports 0, 1, 2 or more input images and 2 or more output images.

When a CIImage containing your CIImageProcessorKernel class is rendered, your class’ implementation of this method will be called as needed for that render. The method may be called more than once if Core Image needs to tile to limit memory usage.

When your implementation of this class method is called, use the provided inputs and arguments objects to return processed pixel data to Core Image via multiple outputs.