By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

create black-white picture on the fly

P: n/a
Hi all,

I want to make a coloured picture black and white when a user moves its
mouse pointer over it. I just don't want to store a coloured an black and
white (grayscaled) version on the server.

Someone done this before?

kind regards
Stijn
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Stijn Goris" <me*****@hotmail.com> wrote in message
news:bH*********************@phobos.telenet-ops.be...
I want to make a coloured picture black and white when a user
moves its mouse pointer over it. I just don't want to store a
coloured an black and white (grayscaled) version on the server.


The combination of JavaScript and web browser DOMs have no standard
mechanisms for manipulating images. If you are willing to only have the
effect on some IE browsers, and write the code so that it does not error
on all other browsers (including the ones that fake the "filters"
properties of DOM elements) you could look into the Microsoft
proprietary "filters" which probably can transform an image to
greyscale. But the cross browser approach would be to do a normal image
swap using a greyscale version of the image, and that would need to be
stored on your server.

Richard.
Jul 20 '05 #2

P: n/a
Stijn Goris wrote on 16 dec 2003 in comp.lang.javascript:
I want to make a coloured picture black and white when a user moves its
mouse pointer over it. I just don't want to store a coloured an black and
white (grayscaled) version on the server.
Why?
Someone done this before?


Sure, use a filter [only IE].

Kijk maar eens hier:

http://msdn.microsoft.com/workshop/a...lters/gray.asp

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #3

P: n/a

"Richard Cornford" <Ri*****@litotes.demon.co.uk> wrote in message
news:br*******************@news.demon.co.uk...
"Stijn Goris" <me*****@hotmail.com> wrote in message
news:bH*********************@phobos.telenet-ops.be...
I want to make a coloured picture black and white when a user
moves its mouse pointer over it. I just don't want to store a
coloured an black and white (grayscaled) version on the server.


The combination of JavaScript and web browser DOMs have no standard
mechanisms for manipulating images. If you are willing to only have the
effect on some IE browsers, and write the code so that it does not error
on all other browsers (including the ones that fake the "filters"
properties of DOM elements) you could look into the Microsoft
proprietary "filters" which probably can transform an image to
greyscale. But the cross browser approach would be to do a normal image
swap using a greyscale version of the image, and that would need to be
stored on your server.

Richard.


I thuld it would be possible. And what good is the filter if it is browser
dependent?

I ll use the server approache...

thanks
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.