Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
toDataURL
Collapse the table of content
Expand the table of content

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).

The canvas elementInternet Explorer 9

 

Syntax


string
           retVal = object.toDataURL(type, jpegquality);

Parameters

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

Remarks

Typical values for the type parameter are image/png or image/jpeg. The type image/gif isn't supported.

 

 

Community Additions

ADD
Show:
© 2015 Microsoft