Results 1 to 1 of 1
Jul 12, 2001, 08:40 #1
- Join Date
- Jun 2000
- 0 Post(s)
- 0 Thread(s)
trying to pull in an image from file which has a white background make the white transparent and copy it onto a new image with a black background, the script below below works except for making the background transparent, anyone got any ideas??
thanks in advance
$image = ImageCreateFromgif("square.gif"); //the image pulled in from a gif
$white = ImageColorAllocate($image, 255, 255, 255);
$vir_image = ImageCreate(300,300); //the new virtual image
$black = ImageColorAllocate($vir_image, 0, 0, 0);
ImageCopy ($vir_image, $image, 50, 50, 0, 0, 100, 100);
//Copy a part of vir_image onto image - starting at the position x,y - from x,y on vir_image to x,y.