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. .NET (Core and Framework)
  4. getpixel code in vb.net

getpixel code in vb.net

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharp
4 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.
  • M Offline
    M Offline
    Member 10225529
    wrote on last edited by
    #1

    hello,I want a code on get pixel from scanned image and want to read that pixel to find whether it is black or white..thank you :)

    L B 2 Replies Last reply
    0
    • M Member 10225529

      hello,I want a code on get pixel from scanned image and want to read that pixel to find whether it is black or white..thank you :)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.getpixel.aspx[^].

      Veni, vidi, abiit domum

      1 Reply Last reply
      0
      • M Member 10225529

        hello,I want a code on get pixel from scanned image and want to read that pixel to find whether it is black or white..thank you :)

        B Offline
        B Offline
        Bernhard Hiller
        wrote on last edited by
        #3

        Bitmap has a GetPixel function returning the color of that pixel:

                System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(...);
                System.Drawing.Color color = bitmap.GetPixel(42, 42);
        
        M 1 Reply Last reply
        0
        • B Bernhard Hiller

          Bitmap has a GetPixel function returning the color of that pixel:

                  System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(...);
                  System.Drawing.Color color = bitmap.GetPixel(42, 42);
          
          M Offline
          M Offline
          Matt T Heffron
          wrote on last edited by
          #4

          If you're going to look at more than a very small number of pixels, you do not want to use GetPixel. It is very slow! See these CodeProject search results[^] for better ways to do this!

          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