Hi There,
Is it possible for the editor to overwrite the image rather than saving a new copy. Alternatively is it possible to get the file path for the saved image in order to do something with it. I have tried subscribing to the ImageSaved event of the Editor but the property ImageSavedEventArgs.Location is an empty string rather than any file path.
So far I have only tried this on iOS.
Its a great control by the way :-)
Robbie
P.S here is some of my code:
SfImageEditorPage editor = new SfImageEditorPage(pathToFileToEdit);
editor.Editor.ImageSaved += Editor_ImageSaved;
await Navigation.PushAsync(new NavigationPage(editor));
private void Editor_ImageSaved(object sender, ImageSavedEventArgs args)
{
var test = args.Location; // test is an empty string
}
public class SfImageEditorPage : ContentPage
{
SfImageEditor _editor;
public SfImageEditorPage(string file)
{
_editor = new SfImageEditor();
_editor.Source = ImageSource.FromFile(file);
Content = _editor;
}
public SfImageEditorPage(Stream file)
{
_editor = new SfImageEditor();
_editor.Source = ImageSource.FromStream(() => file);
Content = _editor;
}
public SfImageEditor Editor { get => _editor; }
}