pset equivelent
-
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
-
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
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 )
-
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 )
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.
-
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
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 )
-
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.
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.
-
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.
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."