<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIContext/startTask(toRender:from:to:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIContext(im)startTaskToRender:fromRect:toDestination:atPoint:error:"
  },
  "title" : "startTask(toRender:from:to:at:)"
}
-->

# startTask(toRender:from:to:at:)

Renders a portion of an image to a point in the destination.

```
func startTask(toRender image: CIImage, from fromRect: CGRect, to destination: CIRenderDestination, at atPoint: CGPoint) throws -> CIRenderTask
```

## Parameters

`image`

A [`CIImage`](/documentation/CoreImage/CIImage) to render.

`fromRect`

The part of the image to render, as if cropped.

`destination`

A [`CIRenderDestination`](/documentation/CoreImage/CIRenderDestination) into which to render the image.

`atPoint`

An origin point in the destination at which to place the image.

## Return Value

An asynchronous [`CIRenderTask`](/documentation/CoreImage/CIRenderTask) to render the image to the specified destination.

## Discussion

This method crops the image to the specified rectangle and renders the result at the indicated origin point. If the image’s [`extent`](/documentation/CoreImage/CIImage/extent) property and `fromRect` argument values are infinite, this call renders the image’s (0, 0) point starting from the origin `atPoint`.

You must use an <doc://com.apple.documentation/documentation/Metal/MTLTexture>-backed [`CIContext`](/documentation/CoreImage/CIContext) to support an <doc://com.apple.documentation/documentation/Metal/MTLTexture>-backed [`CIRenderDestination`](/documentation/CoreImage/CIRenderDestination). Similarly, you must use `GLContext`-backed [`CIContext`](/documentation/CoreImage/CIContext) to support a `GLTexture`-backed [`CIRenderDestination`](/documentation/CoreImage/CIRenderDestination).

This call returns as soon as it enqueues all work required to render the image on the context’s device. In many situations, after issuing a render, you may need to wait for it to complete. In these cases, use the returned [`CIRenderTask`](/documentation/CoreImage/CIRenderTask) as follows:

```swift
let renderTask = try context.startTask(toRender: image, from: fromRect, to: destination, at: point)

let renderInfo = try renderTask.waitUntilCompleted()
```

---

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)