<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/vignetteEffect()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)vignetteEffectFilter"
  },
  "title" : "vignetteEffect()"
}
-->

# vignetteEffect()

Gradually darkens a specified area of an image.

```
class func vignetteEffect() -> any CIFilter & CIVignetteEffect
```

## Return Value

The modified image.

## Discussion

This method applies the vignette effect filter to an image. This effect reduces brightness of the image at the periphery of a specified region.

The vignette effect filter uses the following properties:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `intensity`: A `float` representing the intensity of the vignette effect as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `radius`: A `float` representing the radius of the effect as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `falloff`: A `float` representing the fall off of brightness toward the edge of the image as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `center`: A <doc://com.apple.documentation/documentation/CoreFoundation/CGPoint> representing the center of the image.

The following code creates a filter that darkens the edges of an area on the input image:

```swift
func vignetteEffect(inputImage: CIImage ) -> CIImage {
    let vignetteFilter = CIFilter.vignetteEffect()
    vignetteFilter.inputImage = inputImage
    vignetteFilter.intensity = 1
    vignetteFilter.radius = 650
    vignetteFilter.falloff = 0.5
    vignetteFilter.center = CGPoint(x: 1024, y: 768)
    return vignetteFilter.outputImage!
}
```

![Two pictures of a pink flower surrounded by foliage. The photo on the left shows a single flower photographed close-up, in focus, with good light and no effects. In the photo on the right, a vignette effect filter is applied, resulting in a gradual reduction of an image brightness and reduction of saturation in the periphery. ](images/com.apple.coreimage/media-3600013@2x.png)

---

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)