nbarone Posted April 6, 2010 Share Posted April 6, 2010 I am trying to load in a PNG image, and place a number on top of it. This code is not outputting anything (not even an error): <?php // define base image $base = ($_GET['hover']=='true')?"/images/assets/sel_hover.png":"/images/assets/sel.png"; // create image $image = imagecreatefrompng($base); // define colors $black = imagecolorallocate($image, 0, 0, 0); // text // define font file $font = "helvetica.ttf"; // define incremental number $num = $_GET['inc']; // define header header ("Content-type: image/png"); // write text to image imagettftext($image,10,0,3,3,$black,$font,$num); // display image imagepng($image); imagedestroy($image); ?> Quote Link to comment Share on other sites More sharing options...
Chris92 Posted April 6, 2010 Share Posted April 6, 2010 $base = (($_GET['hover']=='true')?"/images/assets/sel_hover.png":"/images/assets/sel.png"); Probably no error because the header is an image. Quote Link to comment Share on other sites More sharing options...
nbarone Posted April 6, 2010 Author Share Posted April 6, 2010 fixed - source file needed a ".." in front of it. Found error as a PHP Warning in error log. To Chris92... the extra parenthesis are not required, although good practice. 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.