getting pixel colors from an image?

N

Neraph

Sorry, I'm somewhat of a newbie at this.

I'm looking for a method of grabbing the color of a pixel when clicking
on an image (obviously, using javascript). Google searching hasn't
returned anything useful for me.

Thanks.
 
P

Paul Cooper

Sorry, I'm somewhat of a newbie at this.

I'm looking for a method of grabbing the color of a pixel when clicking
on an image (obviously, using javascript). Google searching hasn't
returned anything useful for me.

Thanks.

I doubt it. Javascript doesn't have any access to the contents of an
image, only to the contents of the IMG tag. You could use the ISMAP
attribute and pass the image X,Y position to a client-side script that
would carry out the function, but I don't think you can do it in
Javascript.

Paul
 
T

Thomas 'PointedEars' Lahn

Martin said:
I am not sure there is a way achieving this with script in an HTML
document. There is a Mozilla extension color picker however that does
this: <http://www.iosart.com/firefox/colorzilla/>

I had it installed already and I am sorry to report that it does not work
in Firefox 1.5.x on GNU/Linux: "Installation problem or the Eyedropper mode
isn't supported on your platform. [...]" (There was no installation error,
reinstall did not help, and I have the currently latest version 0.8.3.1.)


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top