Jump to content

Colorizing an image


tibberous

Recommended Posts

I have an image with two colors, black and white. I am trying to make the black transparent, and replace the white with a given color. Does anyone know how to do this? I tried

 

$image = imagecreatefromgif("sheep.gif");

imagecolortransparent($image, imagecolorallocate($image, 0, 0, 0));

 

To try to make black transparent, but it doesn't seem to work.

Link to comment
https://forums.phpfreaks.com/topic/63867-colorizing-an-image/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.