我用SkiaSharp库用Xamarin编写了VS 2019的UWP (最终使用Android,而不是ios)
用这个代码
SKBitmap signature = SKBitmap.Decode(canvasImg.Encode());
using (var image = SKImage.FromBitmap(signature))
using (var data = image.Encode(SKEncodedImageFormat.Jpeg, 80))
{
// Save data to a stream
using (var streamSign = File.Ope
我试图将具有透明背景的PNG图像列表转换为GIF,同时保持背景透明性。我使用了我找到的这段代码,并对其进行了修改:
import os
from PIL import Image
# Create the frames
frames = []
path = "directory/to/my/png/images"
for frame in os.listdir(path):
new_frame = Image.open(path + "/" + frame)
frames.append(new_frame)
# Save into a GI