func takePicture() {
   let settings = AVCapturePhotoSettings()
   if let max = viewData.captureDevice?.activeFormat.supportedMaxPhotoDimensions.last {
      settings.maxPhotoDimensions = max
   }
   viewData.stillImage?.capturePhoto(with: settings, delegate: self)
}