Returns an affine transform for converting between normalized image coordinates and a coordinate space appropriate for rendering the camera image onscreen.
- iOS 11.0+
The orientation intended for presenting the view.
The size, in points, of the view intended for rendering the camera image.
A transform matrix that converts from normalized image coordinates in the captured image to normalized image coordinates that account for the specified parameters.
Normalized image coordinates range from
(0,0) in the upper left corner of the image to
(1,1) in the lower right corner.
This method creates an affine transform representing the rotation and aspect-fit crop operations necessary to adapt the camera image to the specified orientation and to the aspect ratio of the specified viewport. The affine transform does not scale to the viewport's pixel size.
captured pixel buffer is the original image captured by the device camera, and thus not adjusted for device orientation or view aspect ratio.