Canman2005 Posted February 10, 2009 Share Posted February 10, 2009 Hi all I have the following <?php header ("Content-type: image/png"); $img_handle = @imagecreatetruecolor (21, 120) or die ("Cannot Create image"); $back_color = ImageColorAllocate ($img_handle, 0, 0, 0); $txt_color = ImageColorAllocate ($img_handle, 255, 255, 255); ImageStringUp ($img_handle, 4, 1, 100, $_GET['text'], $txt_color); ImagePng ($img_handle); ImageDestroy($img_handle); ?> This creates a vertical imate with text on it. At the moment the size of the GD image is generated using $img_handle = @imagecreatetruecolor (21, 120) or die ("Cannot Create image"); Is there anyway to give it an auto height rather than 120px high? Thanks Dave Link to comment https://forums.phpfreaks.com/topic/144657-gd-image-creation-align-problem/ Share on other sites More sharing options...
Canman2005 Posted February 10, 2009 Author Share Posted February 10, 2009 If not auto sizing, is there anyway to position the text at the top of the image rather than the starting position being at the bottom? If that makes sense Link to comment https://forums.phpfreaks.com/topic/144657-gd-image-creation-align-problem/#findComment-759061 Share on other sites More sharing options...
Canman2005 Posted February 10, 2009 Author Share Posted February 10, 2009 Anyone? Link to comment https://forums.phpfreaks.com/topic/144657-gd-image-creation-align-problem/#findComment-759095 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.