---
title: "convertRect(toImageRect:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikimageview/convertrect(toimagerect:)"
---

# convertRect(toImageRect:)

Converts an image view rectangle to an image rectangle.

## Declaration

```swift
func convertRect(toImageRect viewRect: NSRect) -> NSRect
```

## Parameters

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

## Return Value

Return Value The rectangle specified in coordinates relative to the image.

## See Also

### Converting Points and Rectangles

- [convertPoint(toImagePoint:)](quartz/ikimageview/convertpoint(toimagepoint:).md)
- [convertImagePoint(toViewPoint:)](quartz/ikimageview/convertimagepoint(toviewpoint:).md)
- [convertImageRect(toViewRect:)](quartz/ikimageview/convertimagerect(toviewrect:).md)
