Is it possible to save the shapes separately so they can be edited later?

After saving and reloading the image, the shapes are combined with the image and not editable anymore. Is it possible to save the shapes separately so that they are still editable after reloading?


3 Replies 1 reply marked as answer

ET Eswaran Thirugnanasambandam Syncfusion Team August 9, 2021 12:03 PM UTC

Hi Jason, 
 
Thanks for contacting Syncfusion support. 
 
Your requirement can be achieved by using the Serialization and Deserialization. The image editor control provides support to serialize and deserialize the shapes, so that we can save the current state of the image editor by calling the SaveEdits() method and we can load the shapes back by calling the LoadEdits() method over an image. The code snippet is provided below. 
 
Code snippet: 
 
Serialization: 
Stream stream =  editor.SaveEdits(); 
 
Deserialization: 
editor.LoadEdits(stream); 
  
For more details about Serialization and Deserialization, please refer the below link: https://help.syncfusion.com/xamarin/image-editor/serialization  
 
We have prepared a simple sample to achieve your requirement using the Serialization and Deserialization. Please get the sample from the below link. 
 
 
Regards, 
Eswaran 


Marked as answer

JA Jason August 14, 2021 12:05 PM UTC

Thanks a lot!



ET Eswaran Thirugnanasambandam Syncfusion Team August 16, 2021 09:23 AM UTC

Hi Jason, 
  
Thanks for your update.  
 
We are glad to hear that given suggestion works at your end. 
  
Please let us know if you need any further assistance. 
  
Regards, 
Eswaran 


Loader.
Up arrow icon