forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Find pixel coordinates by color

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Maxiime



Joined: 19 Jun 2008
Posts: 18

PostPosted: Tue Jul 29, 2008 7:27 am    Post subject: Find pixel coordinates by color Reply with quote

Hello.

I searched here, and i found nothing.

I'm trying to find a function that gets the x and y coordinates of a RED pixel on screen. Is there any function ?

Tnx.
(If no: do you know another way to do it?)
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Jul 29, 2008 8:28 am    Post subject: Reply with quote

Must... resist... urge... to... flame...

We don't teach baby-programming here.

DAMN! And I was trying so hard!
Back to top
View user's profile Send private message AIM Address
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Tue Jul 29, 2008 6:06 pm    Post subject: Reply with quote

you must do this way:
1)search with your eyes a red dot
2)take a ruler and measure its distance from left bound
3)take the ruler and measure red dot's distance from upper bound
4) TADA!!!!

alternatively repeat steps 2,3 without the ruler but with a magnifying lens counting pixels from left and up borders...

[warning: if you've taken me seriously, then you need sanitary help right now...]
Back to top
View user's profile Send private message
Maxiime



Joined: 19 Jun 2008
Posts: 18

PostPosted: Tue Jul 29, 2008 6:10 pm    Post subject: Reply with quote

Euhmm, who is here the baby? YOU not me.

I was just asking if there was any function.

I KNOW that i can do it with the graphics library and a FOR loop.

So again:

I'm trying to find a function that gets the x and y coordinates of a RED pixel on screen. Is there any function ?

PS:this is not a forum for baby spammers
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Tue Jul 29, 2008 6:34 pm    Post subject: Reply with quote

Don't try to be the sarchastic star of your movie, dude: sarchasm is for people who know what they're doing. Every crap of a programmer under the sun wouldn't expect to find an idiot-fuction like that you need (max 4 lines i guess). And if so, he would launch a search for some buzzwords in the "doc" folder of pspsdk. Maybe i and J.F. have bad mood most of the time but surely aren't babies, neither professionally or personally, and i personally act this way because having studied for decades to do what i do, i _hate_ babies that want to build a spaceship ignoring what a bicicle is. Believe me, ugly way to start...
Back to top
View user's profile Send private message
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Tue Jul 29, 2008 9:09 pm    Post subject: Reply with quote

Hey Maxiime even if that function existed in sdk (I dont think it actually exists) how do you think that function would go?
If theres an aray of pixels, using for-cycle-or-something-similar method is the only way. It cant be any more simple nor efficient.
So why dont you just go and code it yourself?

Oh and also: there are probably more than one red pixels ... or there might be none as well.
Why the hell do you need coords of one red pixel anyway?
Back to top
View user's profile Send private message
rapso



Joined: 28 Mar 2005
Posts: 147

PostPosted: Tue Jul 29, 2008 10:39 pm    Post subject: Reply with quote

J.F. wrote:
Must... resist... urge... to... flame...

We don't teach baby-programming here.

DAMN! And I was trying so hard!

oh com'on, I know it's hard but you could be a little bit more helpful.
There is of course a function, it's called "getRedPixel".
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group