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

Posted on 2008-11-05
Last Modified: 2013-11-19
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.
Question by:Elham_Seif
    1 Comment
    LVL 23

    Accepted Solution

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity mvc C# 2 27
    WMI, model #, retrieving information 10 50
    report c# 9 56
    Handling arrays 14 27
    I. Introduction In a previous article ( (now deprecated), I discussed how to upgrad…
    PaperPort is a popular document imaging/management product from Nuance Communications ( It is in widespread use by both individuals ( and businesses (http:/…
    Learn how to download your full Prezi presentation for offline presenting. Prezi doesn’t have to be viewed and shared in a web browser, even with a free account you can download your full presentation to share with others. Be sure to download any vi…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now