ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 5th, 2004, 07:57 AM
naitsabes naitsabes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 5 naitsabes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
vb6 - Scan picture for color!

Code:
If Picture1.Point(x, y) = vbyellow

Question:
I need to scan from (x, y) to (x+300,y+300) for the color Yellow,
but is there any easier way to do this instead of makeing like "600 If Picture1.Point(x, y)"?

And is there any simple way to get all yellow pixels in text1.text like eg. text1.text = "3000"

Tnx for reading,
Naitsabes

Reply With Quote
  #2  
Old February 5th, 2004, 04:20 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 14
perhaps an iterative loop?
[For/next loop]

Or is that not what you're asking?

Reply With Quote
  #3  
Old February 5th, 2004, 05:21 PM
naitsabes naitsabes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 5 naitsabes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb

Hi,
I guess thats what im asking for, still not sure how to do this.

this is what im doing atm :"If Picture1.Point(x, y) = vbYellow" then
text1.text = "1.yellow" ect...
im still a newb at vb, but im learning!

Can you show me a example?

tnx,
Naitsabes

Reply With Quote
  #4  
Old February 5th, 2004, 06:22 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
This isn't a language specific problem, it's logic. Here's some pseudo code
Code:
Obtain the dimensions of the image
Begin Row loop (init row counter) until max row reached
  Begin Col loop (init col counter) until max col reached
    check position at row counter and col counter
    increment col counter
  End Col Loop
End Row Loop

Reply With Quote
  #5  
Old February 6th, 2004, 03:11 AM
naitsabes naitsabes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 5 naitsabes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face

Tnx ill try that!

,
Naitsabes

Reply With Quote
  #6  
Old February 6th, 2004, 09:30 AM
naitsabes naitsabes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 5 naitsabes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Is there any source for this on the web?
I dont got enought skills to do this

,
Naitsabes

Reply With Quote
  #7  
Old February 6th, 2004, 09:44 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 14
All you reall need is simple loop and if structures...

Stumpy's practically given it to ya...
all you need is the proper VB syntax...

Certainly google has some beginner tutorials...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > vb6 - Scan picture for color!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap