Creating a gif-file with PHP

From: Date: Mon, 10 Jul 2000 08:54:17 +0000
Subject: Creating a gif-file with PHP
Groups: php.general 
Request: Send a blank email to php-general+get-5697@lists.php.net to get a copy of this message
hi, i'am really new to php and ic don't know how often this question has appeared in past but now once more. I try to create a gif file with php i took the code from the official php documentation: <?php Header("Content-type: image/gif"); $string=implode($argv," "); $im = imagecreatefromgif("button2.gif"); $orange = ImageColorAllocate($im, 220, 210, 60); $px = (imagesx($im)-7.5*strlen($string))/2; ImageString($im,3,$px,9,$string,$orange); ImageGif($im); ImageDestroy($im); ?> and i created a blank gif which i call button2.gif. i named the Php script button.php3 and call it from following html <html> <head> </head> <body> <img src="button1.php3?test"> </body> </html> and the result i got in IE is a blank img with the options: size : -1 byte sizes: 28 x 30 pixels and it doesn't differ if i take a string with 200 chars or only with 2 !! My server is running PHP Version 3.0.12 and gd version 1.6 with FreeType support!!! what can be worse ???? pleaze answer soon !!! it would be very pleasant !! thanx in forward my yazici@chss.net

« previous php.general (#5697) next »