---
title: "CVImageBufferGetCleanRect(_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvimagebuffergetcleanrect(_:)"
---

# CVImageBufferGetCleanRect(_:)

Returns the source rectangle of a Core Video image buffer that represents the clean aperture of the buffer in encoded pixels.

## Declaration

```swift
func CVImageBufferGetCleanRect(_ imageBuffer: CVImageBuffer) -> CGRect
```

## Parameters

- `imageBuffer`: The image buffer containing the clean aperture to retrieve.

## Return Value

Return Value A CGRect structure returning the nominal display size of the image buffer. The size is zero if you pass a value for the image buffer that isn’t a CVImageBuffer type.

## Discussion

Discussion The clean aperture size is smaller than the full size of the image. For example, for an NTSC DV frame, this function returns a CGRect structure with an origin of (8,0) and a size of 704 x 480. note: The origin of this rectangle is always in the lower-left corner. This is the same coordinate system as that used by Quartz and Core Image.

## See Also

### Inspecting image buffers

- [CVImageBufferGetColorSpace(_:)](corevideo/cvimagebuffergetcolorspace(_:).md)
- [CVImageBufferGetDisplaySize(_:)](corevideo/cvimagebuffergetdisplaysize(_:).md)
- [CVImageBufferGetEncodedSize(_:)](corevideo/cvimagebuffergetencodedsize(_:).md)
- [CVImageBufferIsFlipped(_:)](corevideo/cvimagebufferisflipped(_:).md)
