getting pixel colors from an image?

Discussion in 'Javascript' started by Neraph, Feb 14, 2006.

  1. Neraph

    Neraph Guest

    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.
     
    Neraph, Feb 14, 2006
    #1
    1. Advertising

  2. Neraph

    Paul Cooper Guest

    On Tue, 14 Feb 2006 10:58:10 -0500, Neraph <>
    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
     
    Paul Cooper, Feb 14, 2006
    #2
    1. Advertising

  3. 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/
     
    Martin Honnen, Feb 14, 2006
    #3
  4. 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
     
    Thomas 'PointedEars' Lahn, Feb 14, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rfractal30
    Replies:
    5
    Views:
    6,930
    rfractal30
    Mar 6, 2005
  2. André Wagner

    Fastest pixel by pixel operation

    André Wagner, Mar 17, 2008, in forum: Java
    Replies:
    12
    Views:
    1,051
    Larry A Barowski
    Mar 19, 2008
  3. AAaron123

    TreeNode colors come from anchor colors

    AAaron123, Aug 7, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    543
    darrel
    Aug 7, 2008
  4. ZelluX
    Replies:
    3
    Views:
    1,898
    Peter Otten
    Dec 1, 2008
  5. Cro
    Replies:
    2
    Views:
    3,704
    Daniel Fetchinson
    Mar 13, 2009
Loading...

Share This Page