ok, here is my code:
<?
$id = ImageCreateFromPNG("images/rsc_flyer1.png");
$black = ImageColorAllocate($id, 0, 0, 0);
$red = ImageColorAllocate($id, 208, 52, 71);
$font = 'arial';
$filename= sprintf("%s_flyer.png", $flyername);
Imagettftext($id, 18, 0, 32, 192, $red, $font, $headline);
Imagettftext($id, 13, 0, 32, 210, $black, $font, $subhead);
Imagettftext($id, 11, 0, 38, 535, $black, $font, $bodycopy);
ImagePNG($id,"createdimages/$filename");
?>
<?
function watermark($src, $newname, $watermark, $quality) {
$imageInfo = getimagesize($src);
$width = $imageInfo[0];
$height = $imageInfo[1];
$logowidth = $logoinfo[0];
$logoheight = $logoinfo[1];
$horizextra =$width - $logowidth;
$vertextra =$height - $logoheight;
$horizmargin = round($horizextra / 2);
$vertmargin = round($vertextra / 2);
$photoImage = ImageCreateFromGIF($src);
ImageAlphaBlending($photoImage, true);
//ImageGIF($photoImage); // output to browser
ImageGIF($photoImage, $newname, $quality);
}
//$src should be the source file
$src = "images/logo.gif";
//$newname should be the desired output file
$newname = $src;
//$watermark should be the image to be overlayed
$watermark = $src."images/logo.gif";
//run the function :: 4th parameter is quality
watermark($src, $newname, $watermark, 100);
?>
the first block of php is creating an image and the second is attempting to lay an image on top of that. It seems that the php is working but the image iis still not showing up. Any ideas?