0

I am developing an application that requires editing an image by converting it into a canvas an the save the changes as an Image. So my doubt is that, can this Data URL be passed along the application and save to local storage of the browser to be produced back as an image when the application is loaded ??

Zero Piraeus
  • 56,143
  • 27
  • 150
  • 160
Hemantsom
  • 543
  • 2
  • 9
  • 24

1 Answers1

1

Yes, why not.

Only problem is that canvas creates very large filesizes and local storage has a size limit. For production keep limit the use of local storage to 2,5mb. That should cover most browsers.

A better solution would be to post the data url to a server and retrieve it later.

Check it out yourself, compare filesize of your canvas created png to the filesize of optimized png's data url

Arjen
  • 416
  • 4
  • 12
  • Yes, the size limitation in the local storage would be an issue. I think even after optimization the file size is too big to hold multiple data URI's. Would have to find an alternative for that. I appreciate your suggestion of hosting it on server but the application I am developing app that requires minimum use of server calls. – Hemantsom Sep 23 '13 at 09:29