收藏
回答

canvasToTempFilePath报错

框架类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
小程序 canvasToTempFilePath 客户端 Android 6.6.2 1.9.1

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()
            })



回答关注问题邀请回答
收藏

2 个回答

  • 🌞
    🌞
    2018-02-05

    https://developers.weixin.qq.com/blogdetail?action=get_post_info&lang=zh_CN&token=1182023184&docid=89645a245f5e9077a851ca35243c3383

    2018-02-05
    有用
    回复
  • 🌞
    🌞
    2018-02-05

    - -又出现了吗。

    2018-02-05
    有用
    回复
登录 后发表内容