---
title: "transform(forImageWidth:height:)"
framework: vision
role: symbol
role_heading: Instance Method
path: "vision/vnhorizonobservation/transform(forimagewidth:height:)"
---

# transform(forImageWidth:height:)

Creates an affine transform for the specified image width and height.

## Declaration

```swift
func transform(forImageWidth width: Int, height: Int) -> CGAffineTransform
```

## Parameters

- `width`: The width of the image.
- `height`: The height of the image.

## Return Value

Return Value An affine transform.

## See Also

### Evaluating the Horizon

- [angle](vision/vnhorizonobservation/angle.md)
- [transform](vision/vnhorizonobservation/transform.md)
