tarun Posted March 28, 2007 Share Posted March 28, 2007 I Have A PHP Code Which Loads An Image And Puts Text Over It <? $string = $_GET['text']; $r = $_GET['r']; $g = $_GET['g']; $b = $_GET['b']; $id = ImageCreateFromGif("img.gif"); $yellow = ImageColorAllocate($id, 255, 255, 0); $white = ImageColorAllocate($id, 255, 255, 255); $black = ImageColorAllocate($id, 0, 0, 0); $colour = ImageColorAllocate($id, $r, $g, $b); ImageString($id, 4, 10, 20, strtoupper($string), $colour); ImageGIF($id,"./newimg.gif"); ?> <img src="newmonkey.gif"> How Do I Change The Font And The Size Of The Text And Any Other Things Thnx, Tarun Link to comment https://forums.phpfreaks.com/topic/44671-solved-selecting-a-font-for-a-created-image/ Share on other sites More sharing options...
Barand Posted March 28, 2007 Share Posted March 28, 2007 http://www,pgp.net/ImageString or http://www,pgp.net/imagettftext Link to comment https://forums.phpfreaks.com/topic/44671-solved-selecting-a-font-for-a-created-image/#findComment-216948 Share on other sites More sharing options...
poirot Posted March 28, 2007 Share Posted March 28, 2007 Just correcting what might have been typos http://www.php.net/ImageString http://www.php.net/imagettftext And remember you need to have FreeType library installed for imagettftext() to work correctly. Link to comment https://forums.phpfreaks.com/topic/44671-solved-selecting-a-font-for-a-created-image/#findComment-216954 Share on other sites More sharing options...
Barand Posted March 28, 2007 Share Posted March 28, 2007 Oops! Link to comment https://forums.phpfreaks.com/topic/44671-solved-selecting-a-font-for-a-created-image/#findComment-216956 Share on other sites More sharing options...
tarun Posted March 30, 2007 Author Share Posted March 30, 2007 Thnx That Must Be Why It Wasnt Working - (No FreeType Library) TOPIC SOLVED Link to comment https://forums.phpfreaks.com/topic/44671-solved-selecting-a-font-for-a-created-image/#findComment-218269 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.