转换效果图
image.png image.png
nuget引入
Magick.NET-Q8-x64
代码:
// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET.
// Licensed under the Apache License, Version 2.0.
using System.IO;
using ImageMagick;
var desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
var outPath = Path.Combine(desktop,"利群");
var inPath = Path.Combine(desktop,"利群-蓝-iPhone");
foreach(var file in Directory.GetFiles(inPath))
{
var sPath = Path.Combine(outPath,Path.GetFileName(file).Split(".").First() + ".jpg");
var image = new MagickImage(file);
image.Write(sPath);
}
网友评论