---
title: "setImage(_:dirtyRect:)"
framework: Core Image
role: symbol
role_heading: Instance Method
platforms: [iOS 9.0+, iPadOS 9.0+, Mac Catalyst 13.1+, macOS 10.4+, tvOS 9.0+, visionOS 1.0+]
path: "coreimage/ciimageaccumulator/setimage(_:dirtyrect:)"
---

# setImage(_:dirtyRect:)

Updates an image accumulator with a subregion of an image object.

## Declaration

```swift
func setImage(_ image: CIImage, dirtyRect: CGRect)
```

## Parameters

- `image`: The image object whose contents you want to assign to the image accumulator.
- `dirtyRect`: A rectangle that defines the subregion of the image object that’s changed since the last time you updated the image accumulator. You must guarantee that the new contents differ from the old only within the region specified by the this argument.

## Discussion

Discussion For additional details on using this method, see “Imaging Dynamical Systems” in Core Image Programming Guide.

## See Also

### Setting an Image

- [setImage(_:)](coreimage/ciimageaccumulator/setimage(_:).md)
