473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

getting pixel colors from an image?

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.
Feb 14 '06 #1
3 3979
On Tue, 14 Feb 2006 10:58:10 -0500, Neraph <za********@yahoo.com>
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
Feb 14 '06 #2


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/
Feb 14 '06 #3
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
Feb 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: CoreyMas | last post by:
Hello Again, Here is what I want to do: I have an image that is 100 px by 100 px I want to parse each pixel in said image, and store the color of that pixel in a file (the reasons for...
10
by: unknown | last post by:
some one can give me a portable source codes that color a pixel? (env *nix) -- unknown
7
by: TomHL | last post by:
hello, - I have a Bitmap Object named: bmp1 - I already have the numerical values of:red,blue and green colors + I have the X and Y cordinates. How do I set the pixel value via safe code on...
2
by: fripper | last post by:
I want to generate a graphic in a picture box control where the color of each pixel is determined by particular values calculated for each pixel. These values are manipulated in such a way that I...
1
by: fripper | last post by:
In VB 2005ave a I have a picture control ("pix") on which I want to set each pixel color according to a variable, X, that has been calculated (I'm drawing fractals from the Mandelbrot Set). I use...
3
by: Vrijbuiter | last post by:
I want to detect a pixel color number when i move the mouse over de picturebox. I think the next line has the color but i don't now how i get it: System.Drawing.Point pt = new Point() ; pt.X...
30
by: Chaos | last post by:
As my first attempt to loop through every pixel of an image, I used for thisY in range(0, thisHeight): for thisX in range(0, thisWidth): #Actions here for Pixel thisX, thisY But it takes...
4
by: Kevin D. Smith | last post by:
I'm trying to get the difference of two images using PIL. The ImageChops.difference function does almost what I want, but it takes the absolute value of the pixel difference. What I want is a two...
9
by: raylopez99 | last post by:
After refering to the below thread, I take it for C# Forms 2.0, there a way to draw a 1 pixel by 1 pixel rectangle, which I was able to do just now successfully. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.