2

Firstly, the following thread discusses the issue that toDataURL may increase memory consumption, but doesn't offer a way to use toDataURL safely: javascript memory leak with HTML5 getImageData

In my application, I need to call toDataURL. I have a PhoneGap application running on IOS that take photos using the native camera, tiles the images together into one collage image, and sends the final image as a binary 64 string via ajax post to a server. The part of my code that tiles the images uses an html canvas and toDataURL to accomplish that. This tiling occurs repeatedly over the lifetime of the software process. I am seeing the application memory increase until IOS aborts the process.

What would you recommend to do to be able to call toDataURL but not run out of memory? I don't see how to release this memory.

Thanks.

Community
  • 1
  • 1
jacob
  • 21
  • 2

1 Answers1

0

Instead of trying to memory manage, it may just be easier to send the independent images to the server and let the server create the collage for you.

Jag
  • 1,744
  • 2
  • 11
  • 11