Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

gdi+

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 :)

like image 584
Tony Avatar asked Apr 21 '10 11:04

Tony


1 Answers

Bitmap result = new Bitmap(width, height);
result.SetResolution(dpi, dpi);
like image 123
dmonlord Avatar answered Sep 20 '22 21:09

dmonlord