mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
5586119eca
commit
dcf2d388c9
1 changed files with 4 additions and 3 deletions
|
@ -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 @@
|
|||
<?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>
|
||||
|
|
Loading…
Reference in a new issue