2

Can anybody knows how to save html5 div tag data as an image using javascript...

i am doing project using phonegap..

i just want to arrange all canvas data including image inside canvas with some text on it and save it as an full image with any format .jpg,png etc.

is there anybody know ? how to done it using html5 & javascript in android phonegap?

Let me know is there anyone who suggest me..

Amit
  • 23
  • 3

1 Answers1

0

I believe you are looking for canvas.toDataURL or canvas.toBlob (https://developer.mozilla.org/en-US/docs/DOM/HTMLCanvasElement). This presumes you have everything in the canvas to begin with. If you are looking to throw some DOM elements on the canvas (i.e. you want a .png of the non-canvas page), you probably are looking for this answer Using HTML5/Canvas/JavaScript to take screenshots.

Community
  • 1
  • 1
Sam Grondahl
  • 2,397
  • 2
  • 20
  • 26
  • In my project i designed canvas tag inside canvas i used table.. Each row contain differant data such as first row contain image ,second row contain string ,third row contain number...I want to store these all data after submitting all data should be in single image format...what should i do? can anybody suggest me? – Amit Nov 29 '12 at 08:41