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 file/data URL. The final image is not stored in the camera roll. Instead, the
PhotoEditorResult.image returns the image as a data URL or the URL to the exported image in the filesystem
PhotoEditor SDK for Flutter offers some configuration options for the export operation of the image.
The filename for the exported image. The correct filename extension will be automatically added based on the selected export format. It can be an absolute path or file URL or a relative path. If some relative path is chosen it will be created in a temporary system directory and overwritten if the corresponding file already exists. If the value is null an new temporary file will be created for every export.
Please make sure that the provided filename is valid for the different devices and that your application has the corresponding access rights to write to the desired location. For Android, you will want to make sure to set this inside one of the directories conforming to scoped storage:
The image export format determines the file format in which the image will be exported.
quality property determines the compression quality to use when creating the output image with a lossy file format.
The image export type determines the type in which the image should be exported.
// Create [ExportOptions] to customize the export.final exportOptions = ExportOptions(// The name of the exported file.// This needs to be a valid URI you have write access to.filename: "YOUR_VALID_FILENAME",// Create [ImageOptions] to customize the export for a photo.image: ImageOptions(// The image export format determines the file format in which the image should be exported.// In this example, the image should be exported as a PNG.format: ImageFormat.png,// The image export quality determines the quality in which the image should be exported.// In this example, the image should only have an output quality of 50%.quality: 0.5,// The image export type determines the type in which the image should be exported.// In this example, the image should be exported to a file to ease further processing.exportType: ImageExportType.fileUrl));// Create a [Configuration] instance.final configuration = Configuration(export: exportOptions);