|
-
Nov 5th, 2001, 10:43 PM
#1
Thread Starter
Addicted Member
how can i get each pixel's color of my picturebox
Hi guys
I wanted to see, How can I get Each pixel’s color In a picturebox The main Purpese I’m doing this is that I want to find out which pixels’ of my image file are More darker than the others.
Can any body help?
Thank u very much
-
Nov 5th, 2001, 10:52 PM
#2
Member
-
Nov 5th, 2001, 10:54 PM
#3
PowerPoster
Use "Pixel" and "Point" to set and get the pixel on a picturebox.
-
Nov 9th, 2001, 07:28 AM
#4
Thread Starter
Addicted Member
but it seems that it gives me the color of each point in a smaller unit than pixel(maybe twips) how can i take the pixels' color?
-
Nov 9th, 2001, 07:52 AM
#5
Thread Starter
Addicted Member
hellllllllllooo
can't anyone answer?
-
Nov 9th, 2001, 07:56 AM
#6
Retired VBF Adm1nistrator
Set the scalemode of the picturebox to 3, and use the GetPixel API call
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 9th, 2001, 08:05 AM
#7
Hyperactive Member
try this code
Code:
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, _
ByVal y As Long) As Long
Dim pixelColor As Long
pixelColor = GetPixel(Picture1.hdc, x, y)
-
Nov 9th, 2001, 08:15 AM
#8
Thread Starter
Addicted Member
I guess that if I set scalemode to pixel then no more API call will be needed if the point method would work for pixels after that. don't u think so? or the api call works faster?
-
Nov 9th, 2001, 08:48 AM
#9
FYI, pixel is the smallest unit that is displayed on the screen.
-
Nov 9th, 2001, 09:26 AM
#10
Thread Starter
Addicted Member
-
Nov 9th, 2001, 09:32 AM
#11
Retired VBF Adm1nistrator
"Virtually" perhaps. But physically the smallest definable/displayable unit on the screen is a pixel
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 13th, 2001, 08:59 AM
#12
Thread Starter
Addicted Member
yeah maybe on the monitor screen it's so. but when working with printer u can difine and use twip coz some printers r more accuret than monitors
-
Nov 13th, 2001, 09:01 AM
#13
Retired VBF Adm1nistrator
*cough* 2 nil *cough*
*mutter* pansy goalie *mutter*
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 13th, 2001, 09:10 AM
#14
mrdj1002 even for the printer, Pixel - is the smallest unit:
Also, twips are screen independent measurements.
Check out ScaleMode Property for a reference.
-
Nov 13th, 2001, 09:18 AM
#15
Thread Starter
Addicted Member
thanks serg. but u should complain the auther of the book i read this thing in it. and hey plendreg i didn't understand what u said. BTW it seems that u hammerd us in dublin but hey watch out your guys in tehran
-
Nov 13th, 2001, 09:42 AM
#16
Retired VBF Adm1nistrator
Ypur goalkeeper was ... for want of a better word ... a pansy.
He was useless and kept pretending he was hurt. He should have been given a red card !
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
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
|