Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

How is it possible to change the default resolution for Bitmap in C# to something other than 96?

I am developing an application which works with images alot. As you know, the default resolution for a bitmap when we create it, is 96. I'd like to change the default value to 150, so that any new bitmap in my application has the resolution of (150,150).
I can use bm.setResolution(150,150), but I don't want to repeat it for any image I create.
Is there a command that can change the default setting of resolution in my application?
Thanks in advance.
1 Solution
Roshan DavisCommented:
I think if you change the windows display properties DPI to some bigger custom value, the Bitmap also takes the same resolution as default. Have a try on Right click on Desktop->Properties->Settings Tab-> Click on advanced, select 'General' tab and change the DPI there and have a try. This can be set programatically also, if you want the code for that, I can get it.
All the Best

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now