会没有

您现在的位置是:首页 > 前端 > 正文

前端

小程序-canvasToTempFilePath-保存图片-iOS-白色图片-simplecrop

dracarys2023-02-21前端1258
canvasToTempFilePath绘制图片,

canvasToTempFilePath 绘制图片,iOS部分机型,生成图片的时候显示白色?怎么解决的?

小程序里头使用各类剪切组件,例如:Simple-Crop。也是如此解决。

不知道还有人关注这个问题不?
我现在的解决方案是把

<canvas type="2d" style="width:{{_contentWidth}}px;height:{{_contentHeight}}px;" class="crop-content"></canvas>
<canvas type="2d" style="width:{{_contentWidth}}px;height:{{_contentHeight}}px;" class="crop-result"></canvas>

改成

<canvas type="2d" class="crop-content"></canvas>
<canvas type="2d" class="crop-result"></canvas>


crop-content 影响展示;crop-result 影响保存。