applyingFilter(_:parameters:)
Returns a new image created by applying a filter to the original image with the specified name and parameters.
Declaration
func applyingFilter(_ filterName: String, parameters params: [String : Any]) -> CIImageParameters
- filterName:
The name of the filter to apply, as used when creating a Cifilter Swift.class instance with the 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 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:
Creating a CIFilter instance
Setting the original image as the filter’s
inputImageparameterSetting the remaining filter parameters from the
paramsdictionaryRetrieving the outputImage object from the filter
See Also
Creating an Image by Modifying an Existing Image
applyingFilter(_:)transformed(by:)transformed(by:highQualityDownsample:)cropped(to:)oriented(forExifOrientation:)clampedToExtent()clamped(to:)composited(over:)convertingWorkingSpaceToLab()convertingLabToWorkingSpace()matchedToWorkingSpace(from:)matchedFromWorkingSpace(to:)premultiplyingAlpha()unpremultiplyingAlpha()settingAlphaOne(in:)