wx.canvasGetImageData()获取的像素点都是0
代码如下,我将拍到的照片输出到画布,目的是想获得图片的图像像素点数据,可是输出的data都是零,求解 [图片] [代码]this[代码][代码].ctx.takePhoto({[代码][代码] [代码][代码]quality: [代码][代码]'high'[代码][代码],[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]const page = wx.createCanvasContext([代码][代码]'idcard'[代码][代码]);[代码][代码] [代码][代码]page.drawImage(res.tempImagePath);[代码][代码] [代码][代码]page.draw([代码][代码]true[代码][代码],wx.canvasGetImageData({[代码][代码] [代码][代码]canvasId: [代码][代码]'idcard'[代码][代码],[代码][代码] [代码][代码]x: 0,[代码][代码] [代码][代码]y: 0,[代码][代码] [代码][代码]width: 300,[代码][代码] [代码][代码]height: 400,[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]console.log(e)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}));[代码][代码] [代码] [代码] [代码][代码]}[代码][代码]})[代码]