HTMLCanvasElement.ToDataURL
Contents
[
Hide
]ToDataURL()
returns a data URI containing a representation of the image in the format specified by the type parameter (defaults to PNG). The returned image is in a resolution of 96 dpi.
public String ToDataURL()
Return Value
A DOMString containing the requested data URI.
See Also
- class HTMLCanvasElement
- package com.aspose.html
- package Aspose.HTML
ToDataURL(String)
returns a data URI containing a representation of the image in the format specified by the type parameter (defaults to PNG). The returned image is in a resolution of 96 dpi.
public String ToDataURL(String type)
| Parameter | Type | Description |
|---|---|---|
| type | String | A String indicating the image format. The default format type is image/png. |
Return Value
A DOMString containing the requested data URI.
See Also
- class HTMLCanvasElement
- package com.aspose.html
- package Aspose.HTML
ToDataURL(String, double)
returns a data URI containing a representation of the image in the format specified by the type parameter (defaults to PNG). The returned image is in a resolution of 96 dpi.
public String ToDataURL(String type, double encoderOptions)
| Parameter | Type | Description |
|---|---|---|
| type | String | A String indicating the image format. The default format type is image/png. |
| encoderOptions | Double | A Number between 0 and 1 indicating image quality if the requested type is image/jpeg or image/webp. |
Return Value
A DOMString containing the requested data URI.
See Also
- class HTMLCanvasElement
- package com.aspose.html
- package Aspose.HTML