Changing example to Png's and adding note about lack of Gif support in GD since version 1.6

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@33829 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
James Moore 2000-10-14 13:08:07 +00:00
parent 5586119eca
commit dcf2d388c9

View file

@ -8,7 +8,8 @@
convenient, php can output image streams directly to a browser. You
will need to compile PHP with the GD library of image functions for
this to work. GD and PHP may also require other libraries, depending
on which image formats you want to work with.
on which image formats you want to work with. GD stopped supporting
Gif images in version 1.6.
</simpara>
<para>
@ -18,11 +19,11 @@
&lt;?php
Header("Content-type: image/gif");
$string=implode($argv," ");
$im = imagecreatefromgif("images/button1.gif");
$im = imageCreateFromPng("images/button1.png");
$orange = ImageColorAllocate($im, 220, 210, 60);
$px = (imagesx($im)-7.5*strlen($string))/2;
ImageString($im,3,$px,9,$string,$orange);
ImageGif($im);
ImagePng($im);
ImageDestroy($im);
?>
</programlisting>