Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

toDataURL method

Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element (such as img).

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.8.10Internet Explorer 9


           retVal = object.toDataURL(type, jpegquality);


type [in, optional]

Type: string

The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.

jpegquality [in, optional]

Type: number

The quality level of a JPEG image in the range of 0.0 to 1.0.

Standards information


Typical values for the type parameter are image/png or image/jpg.



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.