Save Photo
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. PhotoEditorSaveSettings
holds all the settings related to exporting and saving the photo. Upon export, the Uri
of the exported photo can be obtained from EditorSDKResult.resultUri
.
Output mode#
PhotoEditor SDK supports three OutputMode
s:
EXPORT_ALWAYS
- Default mode. The editor will always export the photo. For a successful export, theEditorSDKResult.resultStatus
would beEXPORT_DONE
.EXPORT_IF_NECESSARY
- The editor will only export if there are any modifications made to the photo. TheEditorSDKResult.resultStatus
would beDONE_WITHOUT_EXPORT
if an export attempt was made without any modifications to the photo.EXPORT_ONLY_SETTINGS_LIST
- The editor will not export the photo. This is useful if you only need the dump of theSettingsList
(viaEditorSDKResult.settingsList
) for serialization or background export. TheEditorSDKResult.resultStatus
would beDONE_WITHOUT_EXPORT
if an export attempt was made.
The output mode can be set in PhotoEditorSaveSettings.outputMode
.
Compression#
JPG/JPEG photos are compressed while exporting to take less disk space. By default, the SDK exports these photos at 80% quality. However, you can override this and change the quality by setting PhotoEditorSaveSettings.jpegQuality
(0 - 100).
Export format#
PhotoEditor SDK supports exporting photos in JPG/JPEG or PNG format. There are three ImageExportFormat
s available:
AUTO
- Default. The image format of the exported photo would be the same as that of the imported photo. In case of background removal, the image format would be PNG.JPEG
- Export as JPEG.PNG
- Export as PNG.
The export format can be set using PhotoEditorSaveSettings.setExportFormat()
.