我在本地主机上使用asp.net core 7将照片转换为webp格式,但照片在Windows服务器上未转换
public static void GetWebp(int width, int height, int quality, string fullPath, string webpFile)
{
ResizeLayer rL = new(new Size(width, height));
rL.ResizeMode = ResizeMode.Crop;
using var webPFileStream = new FileStream(webpFile, FileMode.Create);
using ImageFactory imageFactory = new ImageFactory(preserveExifData: false);
imageFactory.Load(fullPath)
.Format(new WebPFormat())
.Quality(quality)
.Resize(rL)
.Save(webPFileStream);
}
最佳答案
您必须准确安装版本 3.01 vcredist_x64-Main.exe 和 vcredist_x86-Main.exe
关于c# - 如何在 Windows Server 上的 ASP.NET Core 7 中将照片转换为 webp 格式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76347811/