|
-
Mar 13th, 2006, 08:41 PM
#1
Thread Starter
Junior Member
GetPixel Color Value
Im using the BitMap object to get a pixel color. No Im not sure as to how to convert that to a string or to view that in any. The only thing I want to do is get the colour value of the Bitmap pixel. As in black would be 255 and white would be 0. Anyone know how to do this?
Last edited by Root Core; Mar 13th, 2006 at 08:50 PM.
-
Mar 14th, 2006, 10:51 AM
#2
Re: GetPixel Color Value
GetPixel returns a color object doesn't it? With that color you should have the following methods available to you :
GetRed()
GetGreen()
GetBlue()
-
Mar 14th, 2006, 11:07 AM
#3
Re: GetPixel Color Value
From MSDN:
A Color object stores a 32-bit value that represents a color. The color value contains four, 8-bit components: alpha, red, green, and blue. The first 8 bits (the most significant) contain the alpha component, the next 8 bits contain the red component, the next 8 bits contain the green component, and the next 8 bits (the least significant) contain the blue component. The 32-bit value is stored in a variable of type ARGB.
-
Mar 16th, 2006, 12:50 PM
#4
Re: GetPixel Color Value
you could just access the R, G, B, A fields of your Color object
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|