canvas在IOS上绘制签名后保存的图片为一张黑色图片
发布于 5 年前 作者 fanjuan 9133 次浏览 来自 问答

基础版本库1.5.2

使用开发工具绘制签名后保存的图片为正常图片:

但是使用IOS上测试,生成的图片为黑色:

Android上还没有测试。

代码:

wx.canvasToTempFilePath({

      canvasId: ‘canvasID’,

      destWidth:300,

      destHeight:150,

      success: function (res) {

        console.log(res.tempFilePath)

        wx.uploadFile({

          url:‘http://…’,

          filePath: res.tempFilePath,

          name:‘file’,

          success:function(){

            console.log(‘success’)

          }

        })

      }

    })

请问,这个问题要如何解决呢?请大神帮帮忙

回到顶部