I am using Swifts 4 SDK for taking live photos in my app.
Is it possible to take live photo images in different Aspect Ratios? I want to support 4:3, 16:9 and 1:1. I will add some code for how I take my photo, I couldn't realize how to change the aspect ratio, and I understand it may not be a trivial task since LivePhoto has both a video and a photo part.
//define the AVCapturePhotoOutput object somewhere in the code
let photoOutput = AVCapturePhotoOutput()
//capture a photo with the settings defined for livePhoto using the helper function that returns the AVCapturePhotoSettings
photoOutput.capturePhoto(with: getCaptureSettings(), delegate: photoCaptureDelegate!)
func getCaptureSettings() -> AVCapturePhotoSettings {
var settings = AVCapturePhotoSettings()
settings = AVCapturePhotoSettings()
let writeURL = NSURL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("LivePhotoVideo\(settings.uniqueID).mov")
settings.livePhotoMovieFileURL = writeURL
}
So is it possible to do it? and if so, how?