【发布时间】:2020-03-10 09:21:46
【问题描述】:
哪些图像大小调整库可用于托管在 Azure Web 应用服务上的 .NET 核心应用程序?
找到解释几个库的博客:https://devblogs.microsoft.com/dotnet/net-core-image-processing/。
这些库中的大多数(imagesharp 除外)都使用 GDI 等原生 Windows 功能,根据这篇文章,Azure Web App Services 不支持这些功能:https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#win32ksys-user32gdi32-restrictions
目前我可以使用 ImageSharp 调整图像大小,但该库仍处于测试阶段,目前性能不是很好。
【问题讨论】:
-
检查5 Reasons You Should Stop Using System.Drawing from ASP.NET。它解释了 ImageSharp 速度慢的原因以及如何解决这个问题,还指出了 MagicScaler 和 Mono 的 SkiaSharp。
-
Maaaan 这些文章确实过时了。
标签: c# .net azure asp.net-core