[英]Get/set the resolution of an image file using C# net5.0 but without System.Drawing.Common?
Using System.Drawing, it is easy to get the HorizontalResolution and VerticalResolution of an image file.使用System.Drawing,很容易获得图像文件的HorizontalResolution 和VerticalResolution。
In .NET 6, System.Drawing.common will be disabled (by default) and unsupported in other platform than Windows.在 .NET 6 中,System.Drawing.common 将被禁用(默认情况下)并且在除 Windows 以外的其他平台上不受支持。
I try to get an equivalent with another framework.我试图获得与另一个框架等效的东西。 Microsoft recommends to migrate to SkiaSharp or ImageSharp. Microsoft 建议迁移到 SkiaSharp 或 ImageSharp。
I need the support of Jpeg, Png, Bmp and Tiff (single and multi)我需要 Jpeg、Png、Bmp 和 Tiff(单张和多张)的支持
In SkiaSharp, there is no support of image resolution (read and write)...在 SkiaSharp 中,不支持图像分辨率(读取和写入)...
In ImageSharp, they doesn't support Tiff files在 ImageSharp 中,它们不支持 Tiff 文件
How can I get/set the resolution of those 4 images formats in a.net5.0 (and soon.net6.0) multiplatform (Win, Mac and Linux) app?如何在 .net5.0(以及即将推出的 .net6.0)多平台(Win、Mac 和 Linux)应用程序中获取/设置这 4 种图像格式的分辨率?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.