美文网首页
.Net Core 转HEIC 格式为JPG

.Net Core 转HEIC 格式为JPG

作者: Rinaloving | 来源:发表于2021-06-22 13:12 被阅读0次
        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;
            }
    

    相关文章

      网友评论

          本文标题:.Net Core 转HEIC 格式为JPG

          本文链接:https://www.haomeiwen.com/subject/yolbyltx.html