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

# copyMachineTransition()

Simulates the effect of a copy machine scanner light to transiton between two images.

```
class func copyMachineTransition() -> any CIFilter & CICopyMachineTransition
```

## Return Value

The transition image.

## Discussion

This method applies the copy machine transition filter to an image. The effect transitions from one image to another by simulating the scanning light effect of a copy machine.

The copy machine transition filter uses the following properties:

- `inputImage`: The starting image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `targetImage`: The ending image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `time`: A `float` representing the parametric time of the transition from start (at time 0) to end (at time 1) as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `angle`: A `float` representing the angle of the copier light, in radians as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `width`: A `float` representing the width of the effect as a <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `extent`: A <doc://com.apple.documentation/documentation/CoreFoundation/CGRect> representing the area of the copy machine effect.
- `color`: A [`CIColor`](/documentation/CoreImage/CIColor) representing the color of the light.
- `opacity`: A `float` representing the transparency of the copier light as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.

The following code creates a filter that produces a light bar that glides across the input image revealing the target image:

```swift
func copyMachine(inputImage: CIImage, targetImage: CIImage) -> CIImage {
    let copyMachineTransition = CIFilter.copyMachineTransition()
    copyMachineTransition.inputImage = inputImage
    copyMachineTransition.targetImage = targetImage
    copyMachineTransition.time = 0.5
    copyMachineTransition.angle = 0.9
    copyMachineTransition.extent = CGRect(x: 54.1, y: 90.2, width: 300, height: 300)
    copyMachineTransition.color = .white
    copyMachineTransition.width = 200
    copyMachineTransition.opacity = 1.30   
    return copyMachineTransition.outputImage!
}
```

![Three photographs. In the photo on the left, multiple sets of small purple flowers are photographed close up with good lighting, and the background has a slight blur. In the photograph on the right is a tall building with two trees directly in front of the building. In the center photo, a copy machine transition filter is applied, resulting in a still photograph of the moving transition. The left photograph is overlaid on the right photo while slowly transitioning to the city image with a light bar that stretches the height of the image slowly showing the city building image.](images/com.apple.coreimage/media-3616432@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)