Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6788045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:26:16+00:00 2026-05-26T17:26:16+00:00

It is not well known , that if you draw an image, e.g.: graphics.DrawImage(image,

  • 0

It is not well known, that if you draw an image, e.g.:

graphics.DrawImage(image, top, left);

the image will be scaled. This is because DrawImage looks at the dpi setting of the image (e.g. 72dpi from photoshop), and scales the image to match the destination display (typically 96dpi).

If you want to draw an image without any scaling, you must explicitly give DrawImage the size of the image:

graphics.DrawImage(img, top, left, img.Width, img.Height);

i knew this from years of programming in GDI+. The same fact exists in the .NET System.Drawing wrappers around GDI+ – if you want to draw an image unscaled you must force it to scale to the original size.

Which is why i was impressed to find a DrawImageUnscaled method in .NET:

graphics.DrawImageUnscaled(img, top, left);

Except that the image is still scaled; making it identical to:

graphics.DrawImage(img, top, left);

and if you want to draw an image unscaled you must continue to call:

graphics.DrawImage(img, top, left, img.Width, img.Height);

Which brings me to my question: what does DrawImageUnscaled if not to draw an image unscaled?

From MSDN

  • Graphics.DrawImageUnscaled Method (Image, Int32, Int32)

    Draws the specified image using its original physical size at the location specified by a coordinate pair.

  • Graphics.DrawImage Method (Image, Int32, Int32)

    Draws the specified image, using its original physical size, at the location specified by a coordinate pair.

  • Graphics.DrawImage Method (Image, Int32, Int32, Int32, Int32)

    Draws the specified Image at the specified location and with the specified size.

See also

  • MSDN: How to: Improve Performance by Avoiding Automatic Scaling
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:26:17+00:00Added an answer on May 26, 2026 at 5:26 pm

    Well Graphics.DrawImageUnscaled Method (Image, Int32, Int32) doesn’t do anything different than DrawImage (Image, Int32, Int32)

    e.g.

    public void DrawImageUnscaled(Image image, int x, int y)
    {
        this.DrawImage(image, x, y);
    }
    

    However the methods that take in a Height, Width or a rectangle are different. Those methods either ignore the height and width or with the rectangle only use the top and left.

    My guess is that DrawImageUnscaled Method (Image, Int32, Int32) exists for parity reasons and doesn’t have to do with scaling due to dpi difference in the source and target device.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's well known that Apple does not provide automatic garbage collection on the iPhone
It's quite well known that IE6 does not support direct descendant selection with >
It's well known that in Windows a directory with too many files will have
It is well known that the user can define stream manipulators like this: ostream&
It's well known that Silverlight lacks the very compelling x:Type MarkupExtension (MarkupExtension is not
It's well known that Python classes cannot have truly private members. The not- as
I'm parsing a (not well formed) Apple Plist File with java. My Code looks
I'm learning xForms, but apparently not well enough because I can't figure out why
Sorry this is not a very well defined question, I am thinking about an
Is there any WPF control (commercial or not) that integrates well with the MVVM

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.