Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-18-2008, 05:33 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
getpixel()

Could there be a get pixel function? like

PHP Code:
getpixel(objscreenxscreeny
Example:
getpixel("GraalControl", mousescreenx, mousescreeny);

It would make my life a whole lot easier, I don't know how easy this would be to implement but it seriously needs doing please.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #2  
Old 05-18-2008, 05:54 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
This should be extremely easy I would think.

I mean, they even do this kind of thing in Paint.

If nothing else, you could take a screenshot and then use getPixelOnImage() or whatever it is.
__________________
Reply With Quote
  #3  
Old 05-18-2008, 06:09 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by cbk1994 View Post
This should be extremely easy I would think.

I mean, they even do this kind of thing in Paint.

If nothing else, you could take a screenshot and then use getPixelOnImage() or whatever it is.
Yeah, but that would be pretty inefficient imo, having to save a screenshot on the client's computer and then getimgpixel on it...
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #4  
Old 05-18-2008, 06:16 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well there's already a getpixel function that I listed in your other thread? Or is this specifically about getting pixel information from an object?

edit: scratch that, I forgot the current function gets it from an image.

Last edited by DustyPorViva; 05-18-2008 at 06:31 PM..
Reply With Quote
  #5  
Old 05-18-2008, 06:19 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Tigairius View Post
Yeah, but that would be pretty inefficient imo, having to save a screenshot on the client's computer and then getimgpixel on it...
I know, but it's better than nothing I guess.
__________________
Reply With Quote
  #6  
Old 05-18-2008, 06:31 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Probably better if it was a getRect(x,y,w,h) function otherwise it would slow things down tremendously
__________________

Reply With Quote
  #7  
Old 05-18-2008, 09:07 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Robin View Post
Probably better if it was a getRect(x,y,w,h) function otherwise it would slow things down tremendously
Good idea, getpixelrect(x, y, w, h) or something I really need it though.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #8  
Old 05-19-2008, 12:58 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Such a function would be complex for OpenGL/DirectX (taking a screenshot, getting the pixel from that), so it's not planned to be added anytime soon. It would however be simple for the new external windows.
Reply With Quote
  #9  
Old 05-19-2008, 01:11 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Stefan View Post
Such a function would be complex for OpenGL/DirectX (taking a screenshot, getting the pixel from that), so it's not planned to be added anytime soon. It would however be simple for the new external windows.
Try to add that in to the external windows
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #10  
Old 05-19-2008, 01:34 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
Such a function would be complex for OpenGL/DirectX (taking a screenshot, getting the pixel from that), so it's not planned to be added anytime soon. It would however be simple for the new external windows.
Would you really need to take a screenshot? That was just an example of a bad way it could be done. I would think it would be better to do it however other programs do it. I'm guessing each operating system has some way to do it as well?
__________________
Reply With Quote
  #11  
Old 05-19-2008, 01:44 AM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Quote:
Originally Posted by Stefan View Post
Such a function would be complex for OpenGL/DirectX (taking a screenshot, getting the pixel from that), so it's not planned to be added anytime soon. It would however be simple for the new external windows.
Surely you should be able to reference a rect from the surface? (At least on DirectX?)

But yeah it's probably much easier to do with the GDI on windows, but on OS X?
__________________

Reply With Quote
  #12  
Old 05-19-2008, 02:55 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Robin View Post
Surely you should be able to reference a rect from the surface? (At least on DirectX?)

But yeah it's probably much easier to do with the GDI on windows, but on OS X?
There are programs that do it in real time (for example, Fireworks) on OS X.

I'm sure operating systems must have some library or something to do this.
__________________
Reply With Quote
  #13  
Old 05-19-2008, 02:57 AM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Quote:
Originally Posted by cbk1994 View Post
There are programs that do it in real time (for example, Fireworks) on OS X.

I'm sure operating systems must have some library or something to do this.
Not quite the same thing we're talking about Chris.
__________________

Reply With Quote
  #14  
Old 05-19-2008, 03:45 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Robin View Post
Not quite the same thing we're talking about Chris.
From what I can understand, you need to get the color of a pixel at (x, y) on the screen?
__________________
Reply With Quote
  #15  
Old 05-19-2008, 04:03 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by cbk1994 View Post
From what I can understand, you need to get the color of a pixel at (x, y) on the screen?
That's what I need, yes.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #16  
Old 05-19-2008, 05:50 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Fireworks does it (yes, it is selected by my mouse, but it gets hidden when you take a screenshot).

This makes me think it would be a system thing, as it can do it with anything on the screen, not just in that program.
Attached Thumbnails
Click image for larger version

Name:	Picture 58.png
Views:	114
Size:	40.2 KB
ID:	44648  
__________________
Reply With Quote
  #17  
Old 05-19-2008, 01:53 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Actually, theres a handy program I often use which zooms the few pixels around your mouse and gives color informations for the one exactly at your mouse. It can be used on your whole screen, so I guess it should be possible, somehow, without taking a screenshot, because this baby doesnt.
Attached it for the people interested.
Attached Files
File Type: zip EyeDropper.zip (27.2 KB, 100 views)
Reply With Quote
  #18  
Old 05-20-2008, 01:03 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I just remember this, there's also a tool built into Mac.
Attached Thumbnails
Click image for larger version

Name:	Picture 61.png
Views:	102
Size:	36.8 KB
ID:	44651  
__________________
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.