Skip to main content
PESDK/iOS/Guides/Save / Export Photo

Save Photo

PhotoEditor SDK for iOS supports exporting to different locations and file formats.

PhotoEditor SDK exports edited images in the same resolution, as they were originally loaded into the editor, as long as no cropping operation was carried out. You can immediately display the received data or save the result to a file. The final image is not stored in the camera roll or the filesystem. Instead, a delegate method gets called with the resulting image and any further processing has to be handled there.

EXIF Data#

With version 6 of our SDK, we introduced EXIF handling, meaning that all EXIF data of the input image are preserved. The reason why the EXIF data got lost in the first place, is that the UIImage class strips the EXIF data down to a minimal set. Therefore the Photo object that you pass to the editor must be created from a Data or URL object to preserve all existing EXIF data. The following code sample demonstrates the process:

let photo = Photo(url: Bundle.main.url(forResource: "exifSample", withExtension: "jpg")!)
let photoEditViewController = PhotoEditViewController(photoAsset: photo)

Upon export, you will use the property passed to the func photoEditViewControllerDidFinish(_ photoEditViewController: PhotoEditViewController, result: PhotoEditorResult) method defined in the PhotoEditViewControllerDelegate protocol that preserves all the EXIF data.