Click to See Complete Forum and Search --> : Help with colourising an image...


mitya
10-29-2003, 11:33 AM
Hi all

I'm trying to develop a script to colourise an image (which has 15 colours in it) according to the two colours selected by the user.

I've done this to some success by developing a system of working out mathmatically how far away each of the colours in the palette are from each other, then basing those calculations on their colour choice.

But it's not looking right... does anyone know any good tricks or tutorials to re-colour an image? You can see the image at www.vpoint.tv/image.png if you're interested.

Thanks in advance for any help.

PunkSktBrdr01
10-29-2003, 06:36 PM
Check out the imagecolorset() (http://us2.php.net/manual/en/function.imagecolorset.php) function.

mitya
10-29-2003, 06:39 PM
Thanks but I know about imagecolorset and use it a lot. It doesn't help re-colour an image and maintain the shading and image quality, though. It just relaces certain colours.

Oh well, I tried.