---
title: "convertImageRect(toViewRect:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikimageview/convertimagerect(toviewrect:)"
---

# convertImageRect(toViewRect:)

Converts an image rectangle to an image view rectangle.

## Declaration

```swift
func convertImageRect(toViewRect imageRect: NSRect) -> NSRect
```

## Parameters

- `imageRect`: An rectangle specified in coordinates relative to the image.

## Return Value

Return Value An rectangle specified in coordinates relative to the image view.

## See Also

### Converting Points and Rectangles

- [convertPoint(toImagePoint:)](quartz/ikimageview/convertpoint(toimagepoint:).md)
- [convertRect(toImageRect:)](quartz/ikimageview/convertrect(toimagerect:).md)
- [convertImagePoint(toViewPoint:)](quartz/ikimageview/convertimagepoint(toviewpoint:).md)
