C# winforms: How to change DPI of the System.Drawing.BItmap?

荒凉一梦 提交于 2019-12-06 18:56:51

问题


I need to change the DPI of the System.Drawing.Bitmap object from the default value = 96 to e.g. 150. I couldn't find the answer how to do that so I ask here :)


回答1:


Bitmap result = new Bitmap(width, height);
result.SetResolution(dpi, dpi);


来源:https://stackoverflow.com/questions/2682292/c-sharp-winforms-how-to-change-dpi-of-the-system-drawing-bitmap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!