BillyRayPreachersSon
Programmer
Hi all...
I have a 2-colour (black and white) image, which I have placed on a web page. I want to be able to modify both colours to be something other than black and white - but using code only (i.e. not editing the image).
This only has be be in IE for Windows, so I'm not worried about cross-browser or cross-platform issues here.
I know that I can attach a Chroma fillter to the image:
Which will turn the black portions of the image transparent. This effectively enables me to put a background colour behind the image, turning the black into some other colour.
However, I also want to be able to change the white portion of the image into another colour, too.
Does anyone know of any other filters - or any way - of turning one colour into another colour?
Ideally what I would like is to be able to say that "#FFFFFF becomes #newRGB1" and "#000000 becomes #newRGB2".
Thanks!
Dan
I have a 2-colour (black and white) image, which I have placed on a web page. I want to be able to modify both colours to be something other than black and white - but using code only (i.e. not editing the image).
This only has be be in IE for Windows, so I'm not worried about cross-browser or cross-platform issues here.
I know that I can attach a Chroma fillter to the image:
Code:
<IMG SRC="wibble.gif" STYLE="filter:progid:DXImageTransform.Microsoft.Chroma(Color='#000000');">
Which will turn the black portions of the image transparent. This effectively enables me to put a background colour behind the image, turning the black into some other colour.
However, I also want to be able to change the white portion of the image into another colour, too.
Does anyone know of any other filters - or any way - of turning one colour into another colour?
Ideally what I would like is to be able to say that "#FFFFFF becomes #newRGB1" and "#000000 becomes #newRGB2".
Thanks!
Dan