I'm trying to dynamically create an image composed of a background and a round button. I have both images as PNG, and the button is a transparent PNG (checked with Netscape, the background of the page shows through, IE doesn't support transparent PNGs properly)
However, I can't get it to work, I must be missing some function call to treat the button as transparent. Here is what I'm doing at the moment:
fondo.png is the background and boton.png is the button. Right now, the button is copied over the background, but inside a horrible white square (not transparently).
$fondo = ImageCreateFromPNG('fondo.png');
$boton = ImageCreateFromPNG('boton.png');
$nuevaimagen = ImageCreate(350,350);
$transparente = ImageColorTransparent($boton);
ImageCopy($nuevaimagen, $fondo, 0,0,313,108,350,350);
Header( "Content-type: image/png");
Has anybody dealt with something like this before? After reading the manual, I think I need the ImageColorTransparent function, but the manual is not very clear about how to use it.
Any ideas? Thanks