<!--
{
  "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/opTile()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)opTileFilter"
  },
  "title" : "opTile()"
}
-->

# opTile()

Produces an effect that mimics a style of visual art that uses optical illusions.

```
class func opTile() -> any CIFilter & CIOpTile
```

## Return Value

The tiled image.

## Discussion

This filter extracts a tile from the image, applies any specified scaling and rotation, and then assembles the image again to give an optical illusion effect.

The optical illusion tile 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>.
- `angle`: A `float` representing the direction of distortion, in radians as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `width`: A `float` representing the set width of each tile as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `scale`: A `float` representing the scale of numbers of tiles in the output image as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.

The following code creates a filter that results in a distorted image with less detail:

```swift
func op(inputImage: CIImage) -> CIImage {
    let opTile = CIFilter.opTile()
    opTile.inputImage = inputImage
    opTile.center = CGPoint(x: 150, y: 150)
    opTile.scale = 2.80
    opTile.angle = 0
    opTile.width = 65
    return opTile.outputImage!
}
```

![Two photographs. The one on the left is of a bouquet of colorful flowers up close with good lighting and focus. In the photo on the right, an op tile filter is applied, resulting in the image becoming a set of square tiles that contain slightly different portions of the image to create the illusion of movement.](images/com.apple.coreimage/media-3599881@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)