I want to do a grayscale to color image rollover on my images, but I don't want to use a technique that requires creating a duplicate of the image, and I want to avoid sprites. Is this possible? How would I go about doing this?
Asked
Active
Viewed 1,633 times
1 Answers
6
it is possible using canvas and some JS. here is an working example: http://jsfiddle.net/meo/csbaf/
http://www.ajaxblender.com/howto-convert-image-to-grayscale-using-javascript.html (you will need to preload the images...)
PS: there is even a fallback for IE

meo
- 30,872
- 17
- 87
- 123
-
ah - nice! How do you resaturate though? – mheavers Nov 17 '11 at 20:18
-
i would just cover the original image with the desaturated version. – meo Nov 17 '11 at 20:23