如何在 Windows Server 上的 ASP.NET Core 7 中将照片转换为 webp 格式?

问题描述 投票:0回答:2

我在本地主机上使用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);
            }
c# iis webp
2个回答
1
投票

您必须准确安装版本 3.01 vcredist_x64-Main.exe 和 vcredist_x86-Main.exe


1
投票

您必须安装 vcredist_x64-Main.exe 和 vcredist_x86-Main.exe

© www.soinside.com 2019 - 2024. All rights reserved.