鸿蒙系统 企业微信小程序 wx.canvasToTempFilePath失败,提示create bitmap failed
context.draw(false, () => {
setTimeout(() => {
Taro.canvasToTempFilePath({
canvas: '',
x: 0,
y: 0,
fileType: 'jpg',
quality: 1,
width: posterWidth * scale * 2,
height: posterHeight * scale * 2,
destWidth: posterWidth * scale * 2,
destHeight: posterHeight * scale * 2,
canvasId: 'product-poster-' + info.Id,
success: res => {
console.log('path - ', res.tempFilePath)
...
Taro.hideLoading()
},
fail: (res) => {
console.log(res)
Taro.hideLoading()
Taro.showToast({
title: '图片生成失败,请稍候再试!',
icon: 'none'
})
}
}, this)
}, 1000)
})
你好,麻烦提供下能够复现问题的代码片段看下
解决了吗,同问