Contents

photoDimensions

The size, in pixels, of the photo image (in a processed format, such as JPEG) that the capture delivers.

Declaration

var photoDimensions: CMVideoDimensions { get }

Discussion

The output dimensions of a captured image are set at the moment of capture, depending on device orientation and capture session configuration. (For example, when the capture session includes a video output and video stabilization is in use, captured photos are smaller.)

This property provides the dimensions of the image to be delivered in the photoOutput(_:didFinishProcessingPhoto:error:) method. Use this property in earlier delegate methods to find the size of the image before delivery.

If you do not request capture in a processed format (that is, if you request capture in RAW format only), this property’s value has zero width and zero height.

See Also

Examining output dimensions