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. pixel C#

pixel C#

Scheduled Pinned Locked Moved C#
csharpwinformsgraphicsquestion
8 Posts 4 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.
  • J Offline
    J Offline
    Jeeva Jose
    wrote on last edited by
    #1

    How can I put the pixel in GDI+.Please don't go to image processing. There is no tool avalible in C# to put the pixel. Anybody hep me to get this answer.

    Continue...

    B C 2 Replies Last reply
    0
    • J Jeeva Jose

      How can I put the pixel in GDI+.Please don't go to image processing. There is no tool avalible in C# to put the pixel. Anybody hep me to get this answer.

      Continue...

      B Offline
      B Offline
      Bekjong
      wrote on last edited by
      #2

      You can use Graphics.FillRectangle with a width and height of 1.

      Standards are great! Everybody should have one!

      J 1 Reply Last reply
      0
      • J Jeeva Jose

        How can I put the pixel in GDI+.Please don't go to image processing. There is no tool avalible in C# to put the pixel. Anybody hep me to get this answer.

        Continue...

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

        There is in fact a SetPixel method.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        B 1 Reply Last reply
        0
        • B Bekjong

          You can use Graphics.FillRectangle with a width and height of 1.

          Standards are great! Everybody should have one!

          J Offline
          J Offline
          Jeeva Jose
          wrote on last edited by
          #4

          why are you going to FillRectangle that is use for draw rectangle. C++ and VC++ have set pixel.

          Continue...

          B P 2 Replies Last reply
          0
          • C Christian Graus

            There is in fact a SetPixel method.

            Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            B Offline
            B Offline
            Bekjong
            wrote on last edited by
            #5

            There's Bitmap.SetPixel, but no Graphics.SetPixel.

            Standards are great! Everybody should have one!

            C 1 Reply Last reply
            0
            • J Jeeva Jose

              why are you going to FillRectangle that is use for draw rectangle. C++ and VC++ have set pixel.

              Continue...

              B Offline
              B Offline
              Bekjong
              wrote on last edited by
              #6

              why are you going to FillRectangle that is use for draw rectangle Well, I don't: I've never needed a SetPixel method, really. I'm just giving you a quick fix.

              Standards are great! Everybody should have one!

              1 Reply Last reply
              0
              • J Jeeva Jose

                why are you going to FillRectangle that is use for draw rectangle. C++ and VC++ have set pixel.

                Continue...

                P Offline
                P Offline
                phannon86
                wrote on last edited by
                #7

                What is a pixel if not a rectangle of size 1x1?

                He who makes a beast out of himself gets rid of the pain of being a man

                1 Reply Last reply
                0
                • B Bekjong

                  There's Bitmap.SetPixel, but no Graphics.SetPixel.

                  Standards are great! Everybody should have one!

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

                  Well, you didn't say that you needed it on the graphics object. You spoke of image processing, there's no way you can do image processing without a bitmap, so I assumed you were working with a bitmap. A 1x1 rect or a line that is one pixel in size, are your best bets then, I guess.

                  Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                  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