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. Drawing bitmap?

Drawing bitmap?

Scheduled Pinned Locked Moved C#
graphicshelpquestion
5 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.
  • D Offline
    D Offline
    Dominik Reichl
    wrote on last edited by
    #1

    Hello! I'm trying to draw an existing image onto a bitmap. The problem is that I need to scale the image and it is automatically smoothed, but I don't want it smoothed. I use the DrawImage function of Graphics. Setting the SmoothingMode property of the Graphics object seems to have no effect. Any idea how I can draw an image non-smoothed and scaled onto a bitmap? Best regards Dominik


    _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

    A I 2 Replies Last reply
    0
    • D Dominik Reichl

      Hello! I'm trying to draw an existing image onto a bitmap. The problem is that I need to scale the image and it is automatically smoothed, but I don't want it smoothed. I use the DrawImage function of Graphics. Setting the SmoothingMode property of the Graphics object seems to have no effect. Any idea how I can draw an image non-smoothed and scaled onto a bitmap? Best regards Dominik


      _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

      A Offline
      A Offline
      aamironline
      wrote on last edited by
      #2

      Have you tried following? Graphics.InterpolationMode = Drawing2D.InterpolationMode.NearestNeighbor;

      M Aamir Maniar aamirOnline.com

      D 1 Reply Last reply
      0
      • D Dominik Reichl

        Hello! I'm trying to draw an existing image onto a bitmap. The problem is that I need to scale the image and it is automatically smoothed, but I don't want it smoothed. I use the DrawImage function of Graphics. Setting the SmoothingMode property of the Graphics object seems to have no effect. Any idea how I can draw an image non-smoothed and scaled onto a bitmap? Best regards Dominik


        _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

        I Offline
        I Offline
        Insincere Dave
        wrote on last edited by
        #3

        You want InterpolationMode not SmoothingMode. NearestNeighbour will not do any smoothing.

        D 1 Reply Last reply
        0
        • A aamironline

          Have you tried following? Graphics.InterpolationMode = Drawing2D.InterpolationMode.NearestNeighbor;

          M Aamir Maniar aamirOnline.com

          D Offline
          D Offline
          Dominik Reichl
          wrote on last edited by
          #4

          That works, thanks a lot!


          _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

          1 Reply Last reply
          0
          • I Insincere Dave

            You want InterpolationMode not SmoothingMode. NearestNeighbour will not do any smoothing.

            D Offline
            D Offline
            Dominik Reichl
            wrote on last edited by
            #5

            That works, thanks a lot!


            _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

            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