| | How to get a pixel's color from any certain pixel at the screen, using Javascript, dhtml, any client-side scripting language? For example how to get pixel's color for 10,10 pixel? |
|
|
My friend made a version of MSPaint in Java for a project in our Computer Science class, but couldn't make a filler because we determined that there was no plausible way to determine a pixel's color. That, the fact that JavaScript is generally weaker than Java, and the fact that pixels on the client's machine would probably not be on the page where the script is contained would lead me to believe that it's not possible. JS always manages to surprise me, though, so I guess you could keep looking. Just don't get your hopes up.
Okay, considering Javascript is not strong enough, can VBscript do the task?
hi p_a,
I dont think either javascript/vbscript have such a feature incorporated into them. But Java would surely have that feature, which beeseven says to not having found. Even C/C++ have the feature to get the color of the pixed under the mouse cursor. So I do not think that Java would do without such a feature, esp Swing. Cheers.
Thanks all!
I still believe that there should be a way to get pixel's color using client side scripting like Javascript or VBScript. In my web application I even do not need to have the color under mouse pointer, but just the color at certain position, like 10,10 as I mentioned above. I do not know if PHP or Perl can do it (both are server scripting languages) but I am sure that Java can do it. The only problem is that I really want to avoid Java, not because it is bad, but because of - I already have PHP+Javascript in my application, and Java is sometimes slow to start itself into memory, especially on older PCs. I had really bad experience with JSP, I have even kind of strange anxiety using JSP, cause when I transfered my applications from JSP to PHP I got them work much, much faster and more reliable. Somebody would say I should just make better JSP setings on my web server, but, with PHP everything worked amazingly smooth immidiately. I hope that I'll find a way to get pixel color without using Java.
I have got very good sample for you. have a lokk http://www.cs.duke.edu/courses/cps004/fall.../RGBCanvas.html and use in you script. that is gonna help you.
well what i do when i'm trying to get a pixel's color is i press the print screen button on the keyboard, open up photoshop, paste it, zoom in to where the pixels are visible, and use the eyedropper tool to click on the pixel i want the color of. the color goes to foreground color box so click on that twice. a color picker box comes up and at the bottom of it is # beside a textbox. in that textbox is the code of that color so copy and paste that to whereever you need it and there ya go!
Is it possible to use a java applet to find out the color of a pixel on a web page?
Is it possible to use a java applet to find out the color of a pixel on a web page? Did you read two posts up? Maybe three...
It's too bad that the RGBCanvas != the user's screen, isn't it?
Recent Queries:-
Keywords : pixels
|
|
![]() Get Pixel's Color |
| ADD REPLY / Got an Opinion! | Remove these ADs! | RAPID SEARCH! | Free Web Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute more info. to help others. Ask your Doubts & Queries to get answers, So that "Together We can help others!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|