473,382 Members | 1,809 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,382 software developers and data experts.

to select a potion of image on mouse click and change its color

guys,

I need a small help here.. could u please tell me how i can change the color of a portion of an image on selecting that area with mouse.

please.

for e.g: we have the skeleton of human body, i select a small area in leg so that portion selected should have its color changed
Feb 1 '07 #1
5 2769
acoder
16,027 Expert Mod 8TB
To do that, you will probably have to make the full image using parts. Each part of the image should have too versions: one normal and one coloured for selection.

When any image is clicked on, use onclick to call a function which will change the source of that image to the coloured version, e.g.
Expand|Select|Wrap|Line Numbers
  1. img.src='imgcol.gif';
Feb 1 '07 #2
but that is so hard i mean a human body can have so many sections right.. i mean is it possible using imagemap.. creating a layer over it and then able to save that layer?
Feb 1 '07 #3
Atli
5,058 Expert 4TB
Hi.

Is it not possible to create a transparent <div> element positioned ontop of the Image?

I'm kind of new to JS but thats what I'd try to do :P
Feb 1 '07 #4
iam_clint
1,208 Expert 1GB
Hi.

Is it not possible to create a transparent <div> element positioned ontop of the Image?

I'm kind of new to JS but thats what I'd try to do :P
yes its possible
Feb 1 '07 #5
acoder
16,027 Expert Mod 8TB
but that is so hard i mean a human body can have so many sections right.. i mean is it possible using imagemap.. creating a layer over it and then able to save that layer?
The suggestion by Atli is better.

Also, have a look at these to see if they help:
http://frankmanno.com/ideas/css-imagemap-redux/
http://www.cssplay.co.uk/menu/imap.html

Not exactly Javascript, but they might put you on the right track.
Feb 1 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Csaba2000 | last post by:
I want to be able to programatically click on the center of an <INPUT type=image ...> element (I only care about IE 5.5+). This should work regardless of whether IE has focus. Normally you would...
8
by: JLahm | last post by:
I have defined a class for my images called .image that specifies the default border color, width and style. I'd like to be able to have the pseudo elements link, visited and active have one color...
1
by: Eric Trav | last post by:
Hello, I am using mozilla and javascript to change the style background color for my select with onfocus() and back to white with onblur(). When i process onfocus(); i have to click on the...
6
by: ruca | last post by:
Hi gurus, I have a imagebutton in my WebForm, and I want that when I click (mouse down) on her the imagebutton change image and when I "unclick" (mouse up) change to the original image. Basically...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.