Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > getting pixel colors from an image?

Reply
Thread Tools

getting pixel colors from an image?

 
 
Neraph
Guest
Posts: n/a
 
      02-14-2006
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.
 
Reply With Quote
 
 
 
 
Paul Cooper
Guest
Posts: n/a
 
      02-14-2006
On Tue, 14 Feb 2006 10:58:10 -0500, Neraph <(E-Mail Removed)>
wrote:

>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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      02-14-2006


Neraph wrote:

> I'm looking for a method of grabbing the color of a pixel when clicking
> on an image (obviously, using javascript).


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

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      02-14-2006
Martin Honnen wrote:

> Neraph wrote:
>> I'm looking for a method of grabbing the color of a pixel when clicking
>> on an image (obviously, using javascript).

>
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get pixel colors from images in Python 3 Cro Python 2 03-13-2009 10:09 PM
Is there any library that can convert RGB colors to ANSI colors? ZelluX Python 3 12-01-2008 11:08 AM
TreeNode colors come from anchor colors AAaron123 ASP .Net 1 08-07-2008 07:56 PM
Re: Pixel size of individual Pixel Tom Thackrey Digital Photography 2 09-14-2003 04:17 PM
Hot pixel vs. stuck pixel Abrasha Digital Photography 5 09-02-2003 04:49 PM



Advertisments