Instance Method


Produces a CIImage object by applying arguments to a kernel function and using options to control how the kernel function is evaluated.


func apply(_ k: CIKernel, arguments args: [Any]?, options dict: [String : Any]? = nil) -> CIImage?



A CIKernel object that contains a kernel function.


The arguments that are type compatible with the function signature of the kernel function.


A dictionary that contains options (key-value pairs) to control how the kernel function is evaluated.

Return Value

The CIImage object produced by a filter.


If you are implementing a custom filter, this method needs to be called from within the outputImage method in order to apply your kernel function to the CIImage object. You can pass any of the keys defined in Options for Applying a Filter, along with appropriate values, into the options dictionary.

See Also