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

Question About Images

Hi all,

I am new to javascript and this forum, but, I have a question. I run a web
site and have come up with a cool little way to change the colors of an
image when different users are online depending on what they have defined as
their colors. Basically I use the style commands "mask" and "Chroma" to
replace a color in a generic graphic and then invert it, then, layer
graphics to create what looks like a 4 color image but is really 4 images
that are one color each. Pretty much like color separation in art. Anyway,
this allows me to have an unlimited number of color combos while only
storing 4 or so graphics on the server.

The problem with this method is that it seems IE6 is the only browser that
recognizes the mask and chroma styles. So, anyone using firefox, netscape,
opera, etc, will only see a black square. My question is, is there a way in
javascript to accomplish the same effect, but, be standard so that other
browsers can see the effect?

--
Scott
Feb 24 '06 #1
2 1073
VK

Xrak wrote:
Hi all,

I am new to javascript and this forum, but, I have a question. I run a web
site and have come up with a cool little way to change the colors of an
image when different users are online depending on what they have defined as
their colors. Basically I use the style commands "mask" and "Chroma" to
replace a color in a generic graphic and then invert it, then, layer
graphics to create what looks like a 4 color image but is really 4 images
that are one color each. Pretty much like color separation in art. Anyway,
this allows me to have an unlimited number of color combos while only
storing 4 or so graphics on the server.

The problem with this method is that it seems IE6 is the only browser that
recognizes the mask and chroma styles. So, anyone using firefox, netscape,
opera, etc, will only see a black square. My question is, is there a way in
javascript to accomplish the same effect, but, be standard so that other
browsers can see the effect?


AFAIK (As Far As I Know) IE is the only browser having extensive
graphics filters set. Other browsers only able to display image and
many of them (uncluding Firefox but excluding Opera) allow to
dynamically change opacity. They also support PNG images with alpha
channel. I would imagine that combining several PNG images, their
opacity and their relative displacement one could achieve some unusual
visual effects:- but it still will not be the same as what you're
looking for.

:-(

Feb 24 '06 #2

Xrak wrote:
Hi all,

I am new to javascript and this forum, but, I have a question. I run a web
site and have come up with a cool little way to change the colors of an
image when different users are online depending on what they have defined as
their colors. Basically I use the style commands "mask" and "Chroma" to
replace a color in a generic graphic and then invert it, then, layer
graphics to create what looks like a 4 color image but is really 4 images
that are one color each. Pretty much like color separation in art. Anyway,
this allows me to have an unlimited number of color combos while only
storing 4 or so graphics on the server.

The problem with this method is that it seems IE6 is the only browser that
recognizes the mask and chroma styles. So, anyone using firefox, netscape,
opera, etc, will only see a black square. My question is, is there a way in
javascript to accomplish the same effect, but, be standard so that other
browsers can see the effect?


Although not exactly the same as your effect, you can use script and
css layering to draw gratings of very fine vertical or horizontal lines
of a selected color or of a color gradient. One or two of these
gratings can be layered over an image to produce some very interesting
color effects. It has been a long time since I did this, and I just
cleaned up the pages enough to show them in public. I probably would do
some more work on them if I decided to use the effect on a web page.

See http://www.cwdjr.net/rootold/transparent1.html ,
http://www.cwdjr.net/rootold/transparent2.html ,
http://www.cwdjr.net/rootold/transparent3.html ,
http://www.cwdjr.net/rootold/transparent4.html ,
http://www.cwdjr.net/rootold/transparent5.html .

Some of the pages are set to change the grating colors at random, so
reload the page a time or to to see this effect, if present. These
pages work on most recent browsers.

Feb 24 '06 #3

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

Similar topics

5
by: Al Davis | last post by:
Note: I tried cross-posting this message to several newsgoups, including comp.lang.perl.misc, c.l.p.moderated, comp.infosystems.www.authoring.cgi, comp.lang.javascript and comp.lang.php. Nothing...
4
by: Ben | last post by:
This is probably a very simple question (I hope), but my usually great web searching abilities have not turned up the answer I am looking for. I have a php page that includes a file for example...
1
by: Russell Silva | last post by:
I have a program set up something like this: class A { //(...) } class B : public A { //(...) public: void not_in_class_A();
5
by: Brian Angliss | last post by:
I'm relatively new to scripting in JavaScript, so I'm not too surprised I'm having difficulty scripting up an animation effect for my personal site. What I'm trying to do is the following: When...
4
by: seven | last post by:
This might be a newbie question or otherwise easy stuff for some of you, but it's tweaking me ... can't seem to get it to work right. I am working with a script that basically creates two arrays,...
1
by: Aaron | last post by:
I'm trying to do my site without table unless absolutely necessary, and I've run into a problem I'm not sure how to get around. I have a div with float:right that contains some images (the outer...
35
by: Stan Sainte-Rose | last post by:
Hi, What is the better way to save image into a database ? Just save the path into a field or save the image itself ? I have 20 000 images (~ 10/12 Ko per image ) to save. Stan
15
by: Prophet | last post by:
I am using the following for a different picture to show up every day.... <script language="JavaScript"> <!-- function adspic() { var mydate=new Date() var day=mydate.getDay() var...
21
by: DP | last post by:
Hi, I'm not sure if this is the right group to ask. I am developing a small image library and I don't know how to hide the actual path to the image. So I go to the stock photo library websites...
5
by: Computer Guy | last post by:
I know this is not actually a PHP question, but I figured this would be the place to go to get a good answer. I have a website for the neighborhood I live in and people's main concern is security....
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.