cvs: phpdoc-zh /features images.xml
| From: | da li | Date: | Mon, 15 Jul 2002 04:58:32 +0000 |
| Subject: | cvs: phpdoc-zh /features images.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-90@lists.php.net to get a copy of this message | ||
thomaslio Mon Jul 15 00:58:32 2002 EDT
Added files:
/phpdoc-zh/features images.xml
Log:
complete
Index: phpdoc-zh/features/images.xml
+++ phpdoc-zh/features/images.xml
<?xml version="1.0" encoding="gb18030"?>
<!-- $Revision: 1.10 $ -->
<chapter id="features.images">
<title>½¨Á¢ºÍ´¦ÀíͼÏó</title>
<simpara>
PHP ûÏÞÖÆ´´ÔìÐÔµÄHTMLÊä³ö.
Õâ¿ÉÒÔ½¨Á¢ºÍ²Ù×÷¸÷ÖÖÀàÐ͵ÄͼÏó¸ñʽ, °üÀ¨ gif, png, jpg, wbmp,
ºÍ xpm. ÉõÖÁ¸ü¶à, PHP¿ÉÒÔÖ±½ÓÉú³ÉͼÏóÏÔʾµ½ä¯ÀÀÆ÷¡£
Äã±ØÐë±àÒëPHPµÄGD¿â²ÅÄÜʹÓá£GD ºÍ
PHP»òÐíÐèÒªÆäËû¿âÀ´Ö§³ÖÄãËùÐèÒªµÄͼÏó¸ñʽ. GD
1.6ºóÍ£Ö¹Ö§³ÖGIF¸ñʽ
</simpara>
<para>
<example>
<title>ÓÃPHP½¨Á¢PNG</title>
<programlisting role="php">
<![CDATA[
<?php
Header("Content-type: image/png");
$string=implode($argv," ");
$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);
ImagePng($im);
ImageDestroy($im);
?>
]]>
</programlisting>
</example>
Õâ¸öÀý×Ó¿ÉÒÔͨ¹ýÀàËÆ±êÇ©µÄÒ³ÃæÀ´ÊµÏÖ: <img
src="button.php?text"> ÉÏÃæµÄ button.php ½Å±¾
¿ÉÒÔʵÏÖ"text" ×Ö·û´®µþ¼ÓÔÚͼÏóÉÏ
"images/button1.png"
²¢ÇÒÊä³öͼÏó.
ÕâÊÇÒ»¸ö·Ç³£±ãÀûµÄ·½·¨£¬±ÜÃâ»Í¬ÑùµÄ°´Å¥£¬²»ÐèҪÿ´Î¶¼Òª¸Ä±ä°´Å¥µÄÎÄ×Ö£¬ÓôËÖÖ·½·¨¿ÉÒÔ¶¯Ì¬µÄÉú³É¡£
</para>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->