.Net Core 转HEIC 格式为JPG
2021-06-22 本文已影响0人
Rinaloving
using ImageMagick;
using System;
using System.IO;
/// <summary>
/// 转换IPhone(heic)格式照片为jpg
/// </summary>
/// <param name="filePath"></param>
public static string HEICToJPG(string filePath)
{
string newFile = "";
using (MagickImage image = new MagickImage(filePath))
{
newFile = filePath.Replace(Path.GetExtension(filePath), ".jpg");
image.Write(newFile);
}
return newFile;
}