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
- namespace Aspose.Html
- assembly 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
- namespace Aspose.Html
- assembly 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
- namespace Aspose.Html
- assembly Aspose.HTML