We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03f2738 commit 7ff5f13Copy full SHA for 7ff5f13
lib/canvas.js
@@ -52,6 +52,8 @@ Canvas.prototype.createJPEGStream = function (options) {
52
* @since NodeJS v18.0.0
53
*/
54
Canvas.prototype.convertToBlob = async function (options = {}) {
55
+ // If the user agent does not support the requested type, then it must create the file using the PNG format.
56
+ // ref: https://html.spec.whatwg.org/multipage/canvas.html#a-serialisation-of-the-bitmap-as-a-file
57
const type = options.type && FORMATS.includes(options.type)
58
? options.type
59
: 'image/png'
0 commit comments