---
title: "applyingFilter(_:parameters:)"
framework: coreimage
role: symbol
role_heading: Instance Method
path: "coreimage/ciimage/applyingfilter(_:parameters:)"
---

# applyingFilter(_:parameters:)

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

## Declaration

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

## Parameters

- `filterName`: The name of the filter to apply, as used when creating a doc://com.apple.coreimage/documentation/CoreImage/CIFilter-swift.class instance with the doc://com.apple.coreimage/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 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

Return Value An image object representing the result of applying the filter.

## Discussion

Discussion Calling this method is equivalent to the following sequence of steps: Creating a CIFilter instance Setting the original image as the filter’s inputImage parameter Setting the remaining filter parameters from the params dictionary Retrieving the 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 Processing an Image Using Built-in Filters.

## See Also

### Creating an Image by Modifying an Existing Image

- [applyingFilter(_:)](coreimage/ciimage/applyingfilter(_:).md)
- [transformed(by:)](coreimage/ciimage/transformed(by:).md)
- [transformed(by:highQualityDownsample:)](coreimage/ciimage/transformed(by:highqualitydownsample:).md)
- [cropped(to:)](coreimage/ciimage/cropped(to:).md)
- [oriented(forExifOrientation:)](coreimage/ciimage/oriented(forexiforientation:).md)
- [clampedToExtent()](coreimage/ciimage/clampedtoextent().md)
- [clamped(to:)](coreimage/ciimage/clamped(to:).md)
- [composited(over:)](coreimage/ciimage/composited(over:).md)
- [convertingWorkingSpaceToLab()](coreimage/ciimage/convertingworkingspacetolab().md)
- [convertingLabToWorkingSpace()](coreimage/ciimage/convertinglabtoworkingspace().md)
- [matchedToWorkingSpace(from:)](coreimage/ciimage/matchedtoworkingspace(from:).md)
- [matchedFromWorkingSpace(to:)](coreimage/ciimage/matchedfromworkingspace(to:).md)
- [premultiplyingAlpha()](coreimage/ciimage/premultiplyingalpha().md)
- [unpremultiplyingAlpha()](coreimage/ciimage/unpremultiplyingalpha().md)
- [settingAlphaOne(in:)](coreimage/ciimage/settingalphaone(in:).md)
