C# 檢查DPI

System.Drawing.Image img = System.Drawing.Image.FromFile(fileName);

//获取此图形的水平分辨率(即水平dpi)(以像素/英寸为单位)
float dpiX = img.HorizontalResolution;

//垂直分辨率
float dpiY = img.VerticalResolution;

留言

這個網誌中的熱門文章

C# 在 GDI+ 中發生泛型錯誤

[LeetCode] Robot Return to Origin