Results 1 to 4 of 4

Thread: Find white pixel

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    366

    Find white pixel

    Hi, I have an image which is a red background, with a white box on top.
    I need to know the coordinates of that most top left white pixel.
    My idea is to use a screen grabber - the one in the link below,
    http://www.vbforums.com/showthread.php?t=411508

    And the picture comparer attached, modify them both slightly, so that i can grab an area that i know covers the white pixel, then use the pic comparer to find the white pixel, and when it does, tell me in a text box the x an y coordinates of it.

    If anyone thinks they have a moment to try and do this ( or something similar - i can see the pic comparer not being the right method) I would be very grateful, and big rate points coming...

    Thanks
    Very much
    Alex
    Attached Files Attached Files

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Find white pixel

    We dont all come to the forums to write programs for other people (or merge two programs), we come here to help people who have specific problems getting a particular piece of code to work.

    If you make an attempt to do the work yourself, we'll help when you get stuck - but if you want someone to do the work for you, you will be better off going to a site where you can hire programmers to do it.

  3. #3
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Find white pixel

    Novice, if you only need one pixel all you need to do is scan the image until you find the one that is white...simple enough...start at top left and scan downwards, moving to next column if you don't find it (it's less pixels down than across usually...if you KNOW the pixel will be at the top part of the picture then scan left to right)

    I think bitblt (or whatever it's called) is what you're after...I don't use it myself as I rarely need to work with images these days, but someone will help you with it if you ask nicely and don't expect them to do all the work for you :-)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    366

    Re: Find white pixel

    Is this the way to do it though. Or is there an easier way. How do i get it to notice that the pixel is white...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width