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

# pinchDistortion()

Distorts an image by creating a pinch effect with stronger distortion in the center.

```
class func pinchDistortion() -> any CIFilter & CIPinchDistortion
```

## Return Value

The distorted image.

## Discussion

This method applies the pinch distortion filter to an image. This effect creates a rectangular area that pinches source pixels inward, distorting those pixels closest to the rectangle the most.

The pinch distortion filter uses the following properties:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `center`: A set of coordinates marking the center of the image as a <doc://com.apple.documentation/documentation/CoreFoundation/CGPoint>.
- `scale`: A float representing the amount of pinching effect as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `radius`: A float representing the amount of pixels used to create the distortion as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.

The following code creates a filter that results in a distorted image from the center of the photo:

```swift
func pinch(inputImage: CIImage) -> CIImage {
    let filter = CIFilter.pinchDistortion()
    filter.inputImage = inputImage
    filter.radius = 400
    filter.scale = 0.5
    filter.center = CGPoint(x: 1791, y: 1344)
    return filter.outputImage!
}
```

![Two images next to each other. The image on the left contains a black-and-white checkerboard pattern. The image on the right has the pinch distortion filter applied. The center of the image appears to be pulled tightly into the screen with the outer area stretched to compensate.](images/com.apple.coreimage/media-4407323@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)