By default, In SfImageEditor when we save image, the image will be getting saved in gallery. We can also able to override the existing image with edited image.
Step 1: Create SfImageEditor sample with all necessary assemblies.
Please refer the below link to create a simple SfImageEditor sample along with the ways to configure it.
Step 2: To override the existing image with edited image in all the xamarin platforms. For this, you need to implement a DependencyService which is implemented across all the platform specific projects.
For adding the DependencyService, first you need to add an interface in the PCL project as in the below code snippet:
Now, you have to implement and register the DependencyService in the assembly based on platform specific. This can be done as follows:
In forms iOS we get the image path as a local identifier like "570C1598-6EBC-40CC-833E-50478E70FD7C".
Due to privacy level in iOS, it is not possible to override or modify the existing images.
Step 3: Call the following DependencyService method to override the existing image with edited image.
This page will automatically be redirected to the sign-in page in 10 seconds.