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. Displaying pixel values

Displaying pixel values

Scheduled Pinned Locked Moved C#
11 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.
  • S Soulblazer

    Hi, i was wondering is it is possible to pull out the pixels values and display it out. (eg. pixel 1 ->[2,25,125])

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

    GetPixel will do this if you have only a few pixels to do. For speed, if you want them all, you should read my image processing articles. Christian Graus - Microsoft MVP - C++

    S 1 Reply Last reply
    0
    • C Christian Graus

      GetPixel will do this if you have only a few pixels to do. For speed, if you want them all, you should read my image processing articles. Christian Graus - Microsoft MVP - C++

      S Offline
      S Offline
      Soulblazer
      wrote on last edited by
      #3

      how many pointers do i need? 1 or 3? sorry abt that i just took up C# because of my project requirements i am rather confused now thanxz in advace:confused:

      C 1 Reply Last reply
      0
      • S Soulblazer

        how many pointers do i need? 1 or 3? sorry abt that i just took up C# because of my project requirements i am rather confused now thanxz in advace:confused:

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

        Soulblazer wrote: how many pointers do i need? Do you mean to read an image ? 1. My articles will have several images open at once, as they are applying filters. Soulblazer wrote: sorry abt that i just took up C# because of my project requirements What did you use before/why the move to C# ? Christian Graus - Microsoft MVP - C++

        S 1 Reply Last reply
        0
        • C Christian Graus

          Soulblazer wrote: how many pointers do i need? Do you mean to read an image ? 1. My articles will have several images open at once, as they are applying filters. Soulblazer wrote: sorry abt that i just took up C# because of my project requirements What did you use before/why the move to C# ? Christian Graus - Microsoft MVP - C++

          S Offline
          S Offline
          Soulblazer
          wrote on last edited by
          #5

          i have only learnt Java basic however my supervisor wants us to pick us C# to do this project. i am confused as to i have to pull out the red, green and blue values for all the pixels of the whole picture so i was thinking maybe i would need three pointers one for each color. i have been looking at all 6 of your image processing articles for the pass 1 month++.

          C 1 Reply Last reply
          0
          • S Soulblazer

            i have only learnt Java basic however my supervisor wants us to pick us C# to do this project. i am confused as to i have to pull out the red, green and blue values for all the pixels of the whole picture so i was thinking maybe i would need three pointers one for each color. i have been looking at all 6 of your image processing articles for the pass 1 month++.

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

            Soulblazer wrote: i have only learnt Java basic however my supervisor wants us to pick us C# to do this project They are basically the same thing, so no biggie. Soulblazer wrote: i am confused as to i have to pull out the red, green and blue values for all the pixels of the whole picture so i was thinking maybe i would need three pointers one for each color No - did you read my articles ? The byte array that is returned contains a series of bytes, with three for each pixel, blue, green, then red. Why do you need to pull all the pixels out ? What will you do with them ? Christian Graus - Microsoft MVP - C++

            S 1 Reply Last reply
            0
            • C Christian Graus

              Soulblazer wrote: i have only learnt Java basic however my supervisor wants us to pick us C# to do this project They are basically the same thing, so no biggie. Soulblazer wrote: i am confused as to i have to pull out the red, green and blue values for all the pixels of the whole picture so i was thinking maybe i would need three pointers one for each color No - did you read my articles ? The byte array that is returned contains a series of bytes, with three for each pixel, blue, green, then red. Why do you need to pull all the pixels out ? What will you do with them ? Christian Graus - Microsoft MVP - C++

              S Offline
              S Offline
              Soulblazer
              wrote on last edited by
              #7

              i need to display the pixel values inorder to see clearly how the values changes each function.

              C 1 Reply Last reply
              0
              • S Soulblazer

                i need to display the pixel values inorder to see clearly how the values changes each function.

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

                You're showing ALL The pixel values ? Must be a small bitmap, perhaps GetPixel is all you need. Christian Graus - Microsoft MVP - C++

                S 1 Reply Last reply
                0
                • C Christian Graus

                  You're showing ALL The pixel values ? Must be a small bitmap, perhaps GetPixel is all you need. Christian Graus - Microsoft MVP - C++

                  S Offline
                  S Offline
                  Soulblazer
                  wrote on last edited by
                  #9

                  erm it is a big one but will be cropping out a certain part of the picture to see the values.

                  C 1 Reply Last reply
                  0
                  • S Soulblazer

                    erm it is a big one but will be cropping out a certain part of the picture to see the values.

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

                    Same deal - if you only want to pull out a small number of values, you may decide to use getpixel, to simplify the code. Christian Graus - Microsoft MVP - C++

                    A 1 Reply Last reply
                    0
                    • C Christian Graus

                      Same deal - if you only want to pull out a small number of values, you may decide to use getpixel, to simplify the code. Christian Graus - Microsoft MVP - C++

                      A Offline
                      A Offline
                      Anonymous
                      wrote on last edited by
                      #11

                      ok thanx i will work on it

                      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