Failed to execute 'drawImage' on 'CanvasRenderin ?

发布于 8 年前作者 qjin3485 次浏览最后编辑 8 年前来自 ask

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)’;at SelectorQuery callback function

TypeError: 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)’

2 回复
yliu
yliu1 楼6 年前

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

guiyingliu
guiyingliu2 楼6 年前

我把图片放到和JS文件同一个目录里面就可以了。