<!--
{
  "availability" : [
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/apply(_:arguments:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(im)apply:arguments:options:"
  },
  "title" : "apply(_:arguments:options:)"
}
-->

# apply(_:arguments:options:)

Produces a [`CIImage`](/documentation/CoreImage/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?
```

## Parameters

`k`

A `CIKernel` object that contains a kernel function.

`args`

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

`dict`

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

## Return Value

The [`CIImage`](/documentation/CoreImage/CIImage) object produced by a filter.

## Discussion

If you are implementing a custom filter, this method needs to be called from within the [`outputImage`](/documentation/CoreImage/CIFilter-swift.class/outputImage) method in order to apply your kernel function to the [`CIImage`](/documentation/CoreImage/CIImage) object. You can pass any of the keys defined in [Options for Applying a Filter](/documentation/CoreImage/options-for-applying-a-filter), along with appropriate values, into the options dictionary.

## See Also

[`-  apply:`](/documentation/CoreImage/CIFilter-swift.class/apply:)

Produces a [`CIImage`](/documentation/CoreImage/CIImage) object by applying a kernel function.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)