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. Getting Pixel Value

Getting Pixel Value

Scheduled Pinned Locked Moved C#
questiongraphicstutorial
2 Posts 2 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
    Saikek
    wrote on last edited by
    #1

    Hello!!! I was woundering how to get a pixel value from Bitmap ? If i'm using GetPixel().ToArb - it returns a nearest color. How can i convert my picture to Black-and-White, and how can i get ammount of blackness? (Or if you know how to convert a color of Colored image to double?) Thanks. X|

    One nation - underground

    C 1 Reply Last reply
    0
    • S Saikek

      Hello!!! I was woundering how to get a pixel value from Bitmap ? If i'm using GetPixel().ToArb - it returns a nearest color. How can i convert my picture to Black-and-White, and how can i get ammount of blackness? (Or if you know how to convert a color of Colored image to double?) Thanks. X|

      One nation - underground

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

      Saikek wrote:

      Hello!!! I was woundering how to get a pixel value from Bitmap ? If i'm using GetPixel().ToArb - it returns a nearest color.

      GetPixel will return the exact color, what do you think it will give ?

      Saikek wrote:

      How can i convert my picture to Black-and-White, and how can i get ammount of blackness?

      My image processing articles will show the most common way to create greyscale. Once you do that, it's easy to set a threshold and convert to 1 bit.

      Saikek wrote:

      (Or if you know how to convert a color of Colored image to double?)

      Colors are only represented as double in HDR systems, which means never on the PC. Your RGB value represents the exact color information being used to display your image. Even then, a single double value cannot represent a color, there is no linear scale of all colors, they are always a combination of 3 values, be it RGB, or HSL, or whatever.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      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