Questions tagged [todataurl]

a HTMLCanvasElement method that returns the data URI value of a canvas element

HTMLCanvasElement.toDataURL() is a method that returns the value of a element as a string.

Parameters

HTMLCanvasElement.toDataURL() accepts to optional parameters:

  • type: specifies the image type to be returned
  • encoderOptions: specifies the quality of the image to be returned

Resources

Related Tags

208 questions
0
votes
0 answers

Data url to image to submit

Currently I have a canvas.todataurl which I have turned into a jpeg. I wouldn like the user of my website to be able to save the image and then use it for a submit button. Any suggestions on how I could do that.
crassfh
  • 67
  • 4
0
votes
1 answer

Create a Sprite from image array

An Image array created from series of calls to toDataUrl() metod of the canvas. Now I need to create a SpriteSheet out of it. How do I do that? var imgUrl = canvas.toDataURL(); var image = new Image(); image.src = imgUrl; arr.push(image); I've…
Jeffrey.K.
  • 127
  • 1
  • 2
  • 7
0
votes
2 answers

Save graph as image after click link full script

I have this code