<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImage/applyingFilter(_:parameters:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImage(im)imageByApplyingFilter:withInputParameters:"
  },
  "title" : "applyingFilter(_:parameters:)"
}
-->

# applyingFilter(_:parameters:)

Returns a new image created by applying a filter to the original image with the specified name and parameters.

```
func applyingFilter(_ filterName: String, parameters params: [String : Any]) -> CIImage
```

## Parameters

`filterName`

The name of the filter to apply, as used when creating a [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class) instance with the [`init(name:)`](/documentation/CoreImage/CIFilter-swift.class/init(name:)) method.

`params`

A dictionary whose key-value pairs are set as input values to the filter. Each key is a constant that specifies the name of an input parameter for the filter, and the corresponding value is the value for that parameter. See [Core Image Filter Reference](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/uid/TP40004346) for built-in filters and their allowed parameters.

## Return Value

An image object representing the result of applying the filter.

## Discussion

Calling this method is equivalent to the following sequence of steps:

1. Creating a [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class) instance
2. Setting the original image as the filter’s `inputImage` parameter
3. Setting the remaining filter parameters from the `params` dictionary
4. Retrieving the [`outputImage`](/documentation/CoreImage/CIFilter-swift.class/outputImage) object from the filter

> Important:
> This method, though convenient, is inefficient if used multiple times in succession. Achieve better performance by chaining filters without asking for the outputs of individual filters. For more information, see <doc://com.apple.coreimage/documentation/CoreImage/processing-an-image-using-built-in-filters>.

---

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)