Canves compress pictures in the WeChat applet but can’t hide them. I found several solutions

 

1. The first thing that comes to mind is the hidden attribute. Setting it will cause the drawing of canves to fail

 

2. Add a layer of view to the direct child node of the page and hide the view setting.

<view style='width:0px;height:0px;overflow:hidden;'>
  <canvas canvas-id='canone'></canvas>
</view>

 

3. Set the css attribute of canves

https://developers.weixin.qq.com/community/develop/doc/1aadfacdd9f38584881e0c50db2bcda1

https://blog.csdn.net/u011127019/article/details/80638771

Guess you like

Origin blog.csdn.net/wxb880114/article/details/109214166