You are able to save the canvas as serialized data, using the Serialize() method. The canvas will be saved completely with its content. Then to continue editing you are able to deserialize the canvas and its layers. To do it you should use theDeserialize() method.
If you have additional questions or some problems, please feel free to let me now.
I've been trying to save the data, and for some reason it does not work, when i prompt the data to a JS alert i see the data is there, but when i try to save it, it does not work for some reason, is there a preferred way to do the save ? I'm using SQL2005, is there a field that is better suited to save the data ?
i managed serialize the canvas. now what i did to deserialize is was to first serialize it to a string, clear the canvas, and then deserialize the string back to the canvas.
this gives me an error, any idea what i did wrong?
Line 349: {
Line 350: if (l != _photoLayer && l != _regionLayer && !string.IsNullOrEmpty(l.Name))
Line 351: yield return new NamedRectangleRegion(l.Name, new RectangleF(l.Region.Left, l.Region.Top, l.Region.Width, l.Region.Height));
Line 352: }
Line 353: }
in PhotoLabelControl.ascx.cs for line 351 maybe i have an older version that i don't know of?
I need additional information on the error you get. Could you please provide me with stack trace of this error? Also, please let me know what version number of Graphics Mill you use.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 349: {
Line 350: if (l != _photoLayer && l != _regionLayer && !string.IsNullOrEmpty(l.Name))
Line 351: yield return new NamedRectangleRegion(l.Name, new RectangleF(l.Region.Left, l.Region.Top, l.Region.Width, l.Region.Height));
Line 352: }
Line 353: }
I looked through your code. I made my own tests of serializing and deserializing. The methods worked fine for me. Could you please provide me with information on the version of Graphics Mill you use now? Also, if it is possible please provide me with a test link to your page where you experience problem (with uncommented strings to replicate the error). If not, please share your complete sample application. It would be helpful, and allow to investigate the problem in timely manner.