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. Graphics
  4. pset equivelent

pset equivelent

Scheduled Pinned Locked Moved Graphics
csharpgraphicshelptutorial
6 Posts 3 Posters 16 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
    MikeMarq
    wrote on last edited by
    #1

    I have experience in doing graphics in vb5 but I am now using vb.net. I'm a little confused on how the new graphics system works. Could somebody show me some code that will do the eqivelent of the pset method. Also could somebody show me how to read the rgb values of a given pixel. Thanks in advance for your help, Mike

    C 2 Replies Last reply
    0
    • M MikeMarq

      I have experience in doing graphics in vb5 but I am now using vb.net. I'm a little confused on how the new graphics system works. Could somebody show me some code that will do the eqivelent of the pset method. Also could somebody show me how to read the rgb values of a given pixel. Thanks in advance for your help, Mike

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

      what does pset do ? GetPixel is the easiest way to get a pixel value on an image.

      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 )

      M 1 Reply Last reply
      0
      • C Christian Graus

        what does pset do ? GetPixel is the easiest way to get a pixel value on an image.

        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 )

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        Christian Graus wrote:

        what does pset do ?

        pset is VB's SetPixel if I remember correctly :)

        Great job, team. Head back to base for debriefing and cocktails.

        M 1 Reply Last reply
        0
        • M MikeMarq

          I have experience in doing graphics in vb5 but I am now using vb.net. I'm a little confused on how the new graphics system works. Could somebody show me some code that will do the eqivelent of the pset method. Also could somebody show me how to read the rgb values of a given pixel. Thanks in advance for your help, Mike

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

          OK, an image has a setPixel method too. But, if you want to set a lot of pixels, you should read my image processing articles, which means you need to do it in C# and call it from a library.

          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
          • M Mark Salsbery

            Christian Graus wrote:

            what does pset do ?

            pset is VB's SetPixel if I remember correctly :)

            Great job, team. Head back to base for debriefing and cocktails.

            M Offline
            M Offline
            MikeMarq
            wrote on last edited by
            #5

            Thank you guys for your help. One follow up question. Once you use GetPixel to get the individual pixel, how do you split it into individual colors? Thank you Christian for refering me to your article, I would use the pointer method but I've already written alot of code for this project in vb.net and correct me if I am wrong but I don't think pointers can be used in vb? In any case speed really isn't that important for this. I'm mainly just using the graphics for testing purposes to see that certain complex functions are working correctly inside my program.

            M 1 Reply Last reply
            0
            • M MikeMarq

              Thank you guys for your help. One follow up question. Once you use GetPixel to get the individual pixel, how do you split it into individual colors? Thank you Christian for refering me to your article, I would use the pointer method but I've already written alot of code for this project in vb.net and correct me if I am wrong but I don't think pointers can be used in vb? In any case speed really isn't that important for this. I'm mainly just using the graphics for testing purposes to see that certain complex functions are working correctly inside my program.

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              MikeMarq wrote:

              Once you use GetPixel to get the individual pixel, how do you split it into individual colors?

              The return value of GetPixel is a COLORREF and is a DWORD layed out like this: 0x00BBGGRR In C/C++ we have the macros GetRValue, GetGValue, and GetBValue to extract the components from a COLORREF. There's something similar in VB I just can't remember :) Mark

              "Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip 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