0

I try this, but I don't succeed. Is there a posibility to save that object or their values and then use it , e.g. for a redraw?

Phrogz
  • 296,393
  • 112
  • 651
  • 745
Daniel Flores
  • 770
  • 3
  • 12
  • 31

1 Answers1

0

Instead of saving the image data array (which is uncompressed), I would suggest using Canvas.toDataURL to get a base64-encoded PNG for the canvas, and saving that string.

Later, you can draw this data URL to your canvas.

Community
  • 1
  • 1
Phrogz
  • 296,393
  • 112
  • 651
  • 745