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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to get pixel value in colored image in c#

How to get pixel value in colored image in c#

Scheduled Pinned Locked Moved C#
csharphelptutorialquestionworkspace
5 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.
  • F Offline
    F Offline
    Flying_Doc
    wrote on last edited by
    #1

    Dear partners, i'm a newbie programmer in c# environment. Can you help me how to get the pixel value in colored image in c#? thx.GBU :-D Best Regards,

    C N X 3 Replies Last reply
    0
    • F Flying_Doc

      Dear partners, i'm a newbie programmer in c# environment. Can you help me how to get the pixel value in colored image in c#? thx.GBU :-D Best Regards,

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

      This is a task that seems to me to have scope to lead to a general task beyond what a newbie should be doing. In fact, I think that's almost totally guarenteed to be the case, if you're new to C#, you should not be doing any image processing. GetPixel works for a single pixel, but is not efficient for tasks where you need to read lots of them.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • F Flying_Doc

        Dear partners, i'm a newbie programmer in c# environment. Can you help me how to get the pixel value in colored image in c#? thx.GBU :-D Best Regards,

        N Offline
        N Offline
        Natza Mitzi
        wrote on last edited by
        #3

        Create a bitmap and use the SetPixel method. As I remember it has very bad performance but you should check it for your needs. Bitmap bmp = new Bitmap(@"D:\1\img.bmp"); Color c = bmp.GetPixel(3, 3);

        Natza Mitzi

        modified on Monday, March 30, 2009 2:27 AM

        C 1 Reply Last reply
        0
        • N Natza Mitzi

          Create a bitmap and use the SetPixel method. As I remember it has very bad performance but you should check it for your needs. Bitmap bmp = new Bitmap(@"D:\1\img.bmp"); Color c = bmp.GetPixel(3, 3);

          Natza Mitzi

          modified on Monday, March 30, 2009 2:27 AM

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

          He said get, not set.

          Christian Graus Driven to the arms of OSX by Vista.

          1 Reply Last reply
          0
          • F Flying_Doc

            Dear partners, i'm a newbie programmer in c# environment. Can you help me how to get the pixel value in colored image in c#? thx.GBU :-D Best Regards,

            X Offline
            X Offline
            Xmen Real
            wrote on last edited by
            #5

            Bitmap.GetPixel()

            is that what you need but remember that this is slow. You can use unsafe code instead.

            TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN% R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>

            ----------------------------------------------- 128 bit encrypted signature, crack if you can

            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