Jul 27, 2008

Get Pixel's Color

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

free web hosting

Get Pixel's Color

p_a
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?

Reply

beeseven
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.

Reply

p_a
Okay, considering Javascript is not strong enough, can VBscript do the task?

Reply

cse-icons
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.

Reply

p_a
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.

Reply

dul
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.

Reply

kaylanicole
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!

Reply

Aparna
Is it possible to use a java applet to find out the color of a pixel on a web page?

Reply

jlhaslip
QUOTE(Aparna @ Mar 9 2006, 02:00 AM) *

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...

Reply

beeseven
It's too bad that the RGBCanvas != the user's screen, isn't it?

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. getpixel color - 8.82 hr back. (1)
  2. javascript image get color at pixel - 9.17 hr back. (1)
  3. color pixel - 11.11 hr back. (1)
  4. getting pixel color - 15.13 hr back. (1)
  5. java jpanel get pixel colour - 23.65 hr back. (1)
  6. get color of pixel application - 30.47 hr back. (2)
  7. image pixel color - 32.79 hr back. (1)
  8. vbscript read image pixel color - 39.61 hr back. (1)
  9. java screen color pixel read - 40.19 hr back. (1)
  10. pixel color javascript - 41.35 hr back. (1)
  11. javascript get color of pixel - 42.73 hr back. (1)
  12. java get color of pixel - 43.64 hr back. (1)
  13. javascript get image pixel - 48.23 hr back. (1)
  14. javascript get pixel color - 49.22 hr back. (1)
Similar Topics

Keywords : pixels


    Looking for pixels, color

Searching Video's for pixels, color
advertisement



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