Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DrawImageUnscaled......why scaled?

DrawImageUnscaled......why scaled?

Scheduled Pinned Locked Moved C#
questioncssgraphics
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sduhd
    wrote on last edited by
    #1

    I draw an image in the form_Paint event handler: e.Graphics.DrawImageUnscaled(bmp,0,0/*panel1.Bounds*/); But the image IS scaled! The size of bmp is 2048*1900, but the whole image was drawn in a small area of the form, the width was 800 more or less. Why scaled? How can I make it unscaled?

    C G 2 Replies Last reply
    0
    • S sduhd

      I draw an image in the form_Paint event handler: e.Graphics.DrawImageUnscaled(bmp,0,0/*panel1.Bounds*/); But the image IS scaled! The size of bmp is 2048*1900, but the whole image was drawn in a small area of the form, the width was 800 more or less. Why scaled? How can I make it unscaled?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      That's really weird. Is there any sort of scaling transform happening on the graphics object ? Christian Graus - Microsoft MVP - C++

      1 Reply Last reply
      0
      • S sduhd

        I draw an image in the form_Paint event handler: e.Graphics.DrawImageUnscaled(bmp,0,0/*panel1.Bounds*/); But the image IS scaled! The size of bmp is 2048*1900, but the whole image was drawn in a small area of the form, the width was 800 more or less. Why scaled? How can I make it unscaled?

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        The DrawImageUnscaled method draws the image at it's original physical size. The size is about 11" wide, so it's resized to show up as 11" wide on the screen. If you want to draw the image without resizing, use a different method. --- b { font-weight: normal; }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups