yekis Posted December 18, 2007 Share Posted December 18, 2007 when i preview my php file in a browser, no image appears...don't know what's wrong with my code....tnx <?php { header ("Content-type: image/png"); //define images $background = imagecreatefrompng("background.png"); $overlay = imagecreatefrompng("logo.png"); imagecopymerge($background, $overlay, 0,0,0,0,480,360,100); imagepng($background,"",100); imagedestroy($background); } ?> [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
dbillings Posted December 18, 2007 Share Posted December 18, 2007 are your images stored in the same directory as the file? If not you'll need to include the correct path. <?php $background = imagecreatefrompng("images/background.png"); ?> Quote Link to comment Share on other sites More sharing options...
yekis Posted December 18, 2007 Author Share Posted December 18, 2007 yes they are saved in the same directory...here's the exact "error" i get when i preview my file in the ff: browsers 1. internet explorer (see attachment) 2. firefox..the screen simply dislays the url in the window http://localhost/delete2.php [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted December 18, 2007 Share Posted December 18, 2007 try this <?php header ("Content-type: image/png"); $background = imagecreatefrompng("background.png"); $insert = imagecreatefrompng("logo.png"); imagecopymerge($background, $insert, 0, 0, 0, 0, 480, 360, 30); imagepng($background); imagedestroy($background); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.