CapturePhoto class Null safety
A container for image data collected by a photo capture output.
When you capture photos with the CapturePhotoOutput class, your delegate object receives each resulting image and related data in the form of an CapturePhoto object. This object is an immutable wrapper from which you can retrieve various results of the photo capture.
In addition to the photo image pixel buffer, an CapturePhoto object can also contain a preview-sized pixel buffer, capture metadata, and, on supported devices, depth data and camera calibration data. From an CapturePhoto object, you can generate data appropriate for writing to a file, such as HEVC encoded image data containerized in the HEIC file format and including a preview image, depth data and other attachments.
An CapturePhoto instance wraps a single image result. For example, if you request a bracketed capture of three images, your callback is called three times, each time delivering a single CapturePhoto object.