×

html5教程

前端 canvas toDataURL() 转图片生成空白图片问题

My My 发表于2024-06-22 浏览6013 评论0
前端 canvas toDataUrl() 转图片生成空白图片问题 前言:如果你在开发过程中,也发生该类似情况,不妨尝试一下以下方法! 感谢大神 感谢 stackoverflow 格曼大神的答案原文链接:Canvas toDataURL() returns blank image 解决方法 // 页面初始化时候,自执行该函数 <script> HTMLCanvasElement.prototype.getContext = function(origFn) {