ctx.fillStyle="#fff"; ctx.fillRect(0,0, canvas_width, canvas_height); ctx.drawImage(img,0,0);
canvas转base64/jpeg时,透明区域变成黑色背景的解决方案_将canvas渲染的base64图片压缩后出现黑边_时清云的博客-CSDN博客