canvas.toDataURL(type, encoderOptions);
MDN 's description about the type parameter says the following:(MDN关于type参数的描述如下:)
type Optional(类型 可选)
A DOMString indicating the image format.(指示图像格式的DOMString 。) The default type is image/png .(默认类型为image / png 。)
I have yet to find what all the types are, as I'm trying to evaluate what is possible to use in different cases.(我还没有找到所有的类型,因为我正在尝试评估在不同情况下可以使用的类型。)
Edit: MSDN's article about toDataURL() doesn't really help either.(编辑: MSDN的有关toDataURL() 的文章也没有帮助。)
I know about the following:(我了解以下内容:)
-
image/png
quality (encoder options) doesn't seem to influence output(image/png
质量(编码器选项)似乎不影响输出)
-
image/jpeg
quality (encoder options) influences output(image/jpeg
质量(编码器选项)影响输出)
-
image/webp
quality influences output.(image/webp
质量会影响输出。) (Chrome-only according to MDN).((根据MDN,仅适用于Chrome)。)
But after looking around I can't seem to find a list of possible types and their encoder options... that's pretty much all I could find.(但是环顾四周之后,我似乎找不到可能的类型及其编码器选项的列表……这几乎是我所能找到的全部。)
What are the other possibilities?(还有其他可能性吗?)
ask by Jeff Noel translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…