In the WeChat applet API, drawImage is used to draw the image, and the image maintains its original size.
drawImage
Definition
Draws an image, keeping the original size of the image.
Parameters
Example
const ctx = wx.createCanvasContext('myCanvas') wx.chooseImage({ success: function(res){ ctx.drawImage(res.tempFilePaths[0], 0, 0, 150, 100) ctx.draw() } })