apply(withExtents:inputs:arguments:)
Call this method on your multiple-output Core Image Processor Kernel subclass to create an array of new image objects given the specified array of extents.
Declaration
class func apply(withExtents extents: [CIVector], inputs: [CIImage]?, arguments: [String : Any]?) throws -> [CIImage]Parameters
- extents:
The array of bounding rectangles that the
CIImageProcessorKernelcan produce. Each rectangle in the array is an object created using/CIVector/vectorWithCGRect:This method will returnCIImage.emptyImageif a rectangle in the array is empty. - inputs:
An array of Ciimage objects to use as input.
- arguments:
This dictionary contains any additional parameters that the processor needs to produce its output. The argument objects can be of any type but in order for CoreImage to cache intermediates, they must be of the following immutable types:
NSArray,NSDictionary,NSNumber,NSValue,NSData,NSString,NSNull, Civector, Cicolor,CGImage,CGColorSpace, orMLModel.
Return Value
An autoreleased CIImage
Discussion
The inputs and arguments will be retained so that your subclass can be called when the image is drawn.
This method will return nil and an error if:
calling outputFormat(at:arguments:) on your subclass returns an unsupported format.
calling formatForInput(at:) on your subclass returns an unsupported format.
your subclass does not implement process(with:arguments:output:)