-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CanvasContext.drawImage()报错问题 #4091
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
在什么平台下报的错,具体错误截图看下 |
楼主问题解决了吗 是怎么回事? |
楼主后面解决了吗 现在我遇到和你一样情况 望楼主指教下谢谢 |
|
后面h5单独写了一套。没用Taro.createCanvasContext()。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用Canvas画图,代码大致如下:
let ctx = Taro.createCanvasContext('myCanvas', this) console.log('===图片信息==',images) let front = images.front console.log('==底图信息==', front) ctx.drawImage(front, 10, 10, 300, 400) ctx.draw()
其中front是下载下来的图片,格式为:
http://127.0.0.1:9091/f52be074-19d3-4c12-abbb-dc158975544e
报的错误如下:
Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)'
有大佬知道是什么原因,怎么处理吗?求解答
The text was updated successfully, but these errors were encountered: