DarePoo Posted January 13, 2009 Share Posted January 13, 2009 I'm not very well versed on creating images with the GD functions so that is most likely the problem. I actually just learned all of this within the past 2 days. Anyway, I can't get an image to be created. The code is as follows: <?php // make uniform picture $imgdir = "ranks/uniforms/".$_GET['gender']."/"; $uniform = array(); $uniform['rank'] = strtolower($_GET['rank']); $uniform['uniform'] = @imagecreatefrompng($imgdir."rank-".$uniform['rank'].".png") $uniform['nametag'] = imagecreatefrompng($imgdir."name-tag.png"); imagecopy($uniform['uniform'], $uniform['nametag'], 80, 170, 0, 0, 47, 16); $uniform['name'] = strtoupper($_GET['name']); $uniform['nametag']['font'] = imageloadfont("../font.gdf"); $uniform['nametag']['color'] = imagecolorallocate($uniform['nametag'], 255, 255, 255); imagestring($uniform['uniform'], $uniform['nametag']['font'], 80, 170, $uniform['name'], $uniform['nametag']['color']); imagepng($uniform['uniform']); ?> That is uniform.php. How I am displaying the image is: <img src="'.e_PLUGIN.'roster/images/uniform.php?gender='.$member_a['roster_member_gender'].'&rank='.$rank[2].'&name='.$member_a['roster_member_name'].'" border="0" /> All of that is correct. The HTML output is: <img border="0" src="../../e107_plugins/roster/images/uniform.php?gender=Male&rank=COL&name=Beckwith"/> That is exactly how it should be, the image just isn't being created. All the paths are correct in the uniform.php file. Any and all help would be greatly appreciated. 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.