tkey Posted August 17, 2008 Share Posted August 17, 2008 Hey, this is going way over my head. Hopefully someone can help me out! Firstly the codes: <?php header('Content-type: image/png'); $text = $_GET['text']; $im = imagecreatefrompng ("img.png"); $color = imagecolorallocate($im,30,84,137); imageAlphaBlending($im, true); imageSaveAlpha($im, true); $font = 'font.ttf'; $fontsize = 22; imagettftext($im, $fontsize, 0, 30, 35, imagecolorallocate($im,10,53,97), $font, 'text1, '); imagettftext($im, $fontsize, 0, 100, 35, $color, $font, $text); imagepng($im); imagedestroy($im); ?> That's what I got, and it's working fine. However I would like the "text1" and inputted text to be centered above the image. I'm pretty sure it's possiable as I found the following page. http://www.codingtuts.com/coding-tutorials/php/image-manipulation/center-align-text-with-gd If anyone could run this by me Cheers, ~ Tkey Link to comment https://forums.phpfreaks.com/topic/120074-gd-problem/ Share on other sites More sharing options...
Barand Posted August 17, 2008 Share Posted August 17, 2008 if it's above the image, how can it be part of the image? Link to comment https://forums.phpfreaks.com/topic/120074-gd-problem/#findComment-618767 Share on other sites More sharing options...
tkey Posted August 18, 2008 Author Share Posted August 18, 2008 Well, it's on blank canvas above the image Sorry for the misunderstanding. Cheers, ~ Tkey Link to comment https://forums.phpfreaks.com/topic/120074-gd-problem/#findComment-619087 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.