canvasToTempFilePath报错
发布于 5 年前 作者 qdeng 17589 次浏览 来自 问答

create bitmap failed

安卓下会报错,目前尝试了小米和华为手机

看到论坛里去年就有帖子提到过,说是screenWidth为0,但我打印出来screenWidth是正常的

相关代码:

            this.ctx.draw(true,async()=>{
                const result = await wepy.canvasToTempFilePath({
                    x: 0,
                    y: 0,
                    destWidth: canvasWidth  *4,
                    destHeight: canvasHeight  *4,
                    canvasId: 'painter',
                    quality:1,
                })
                this.imagePath = result.tempFilePath
 
                this.$apply()
            })


回到顶部