Whats the best method to find the image resolution going to be captured using setting AVCaptureSessionPresetPhoto
.
I am trying to find the resolution before capturing the image.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
With the function below, you can programmatically get the resolution from
activeFormat
before capture begins, though not before adding inputs and outputs: https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureDevice_Class/index.html#//apple_ref/occ/instp/AVCaptureDevice/activeFormatCan be done in this way:
There's probably no way to directly get the camera resolution programmatically before capturing an image.
Apple provides a table for various devices and presets:
Capturing Still Images
Here is the a table of all tested camera sessionPreset`s on devices, that support iOS 9
CODE
Try this code for get maximum Image resolution for device cameras: