简体   繁体   English

使用 C#.net5.0 但没有 System.Drawing.Common 获取/设置图像文件的分辨率?

[英]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 种图像格式的分辨率?

ImageSharp V2 is out and supports TIFF, see NuGet ImageSharp V2 已推出并支持 TIFF,请参阅NuGet

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 C#.NET5.0 中 Windows Forms - 如何让面板在绘画事件中绘制之前不使用 BackColor 清除自身? - In C#/NET5.0 Windows Forms - How can I get a panel to NOT clear itself with the BackColor before drawing in the paint event? 我应该安装哪些库才能在基于 Alpine 的图像中的 ASP NET Core 应用程序中使用 System.Drawing.Common - Which libraries should I install for work with System.Drawing.Common in ASP NET Core application inside Alpine-based image IronPDF 对 System.Drawing.Common 的依赖 - IronPDF dependency on System.Drawing.Common 在.Net5.0中使用ToastNotificationManager - Using ToastNotificationManager in .Net5.0 System.Drawing.Common 不适用于 Windows - System.Drawing.Common not working on Windows 如何在C# net5.0中使用with关键字将一条记录复制到另一条记录 - How to copy a record to another record using the with keyword in C# net5.0 .NET Core System.Drawing.Common PrintDocument在Linux上不起作用 - .NET Core System.Drawing.Common PrintDocument doesn't work on Linux .NET System.Drawing.Common 4.5.1 的 NuGet 包包含不正确的程序集版本 - NuGet package for .NET System.Drawing.Common 4.5.1 contains incorrect version of assemblies 错误 NU1100:无法为“net6.0”解析“HtmlAgilityPack (>= 1.11.45)”和“System.Drawing.Common (>= 6.0.0)” - error NU1100: Unable to resolve 'HtmlAgilityPack (>= 1.11.45)' and 'System.Drawing.Common (>= 6.0.0)' for 'net6.0' .NET 6/7 从 System.Drawing.Common 迁移到 Microsoft.Maui.Graphics - .NET 6/7 Migration from System.Drawing.Common to Microsoft.Maui.Graphics
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM