cvs: phpdoc-zh /reference/image/functions imagecreate.xml imagecreatefromgif.xml imagecreatefromjpeg.xml imagecreatefrompng.xml
imagecreatefromstring.xml imagecreatefromwbmp.xml imagecreatefromxpm.xml imagecreatetruecolor.xml imageellipse.xml imagefilledarc.xml
imagefilledellipse.xml imagefilledpolygon.xml
| From: | Dallas Thunder | Date: | Tue, 06 Sep 2005 20:26:02 +0000 |
| Subject: | cvs: phpdoc-zh /reference/image/functions imagecreate.xml imagecreatefromgif.xml imagecreatefromjpeg.xml imagecreatefrompng.xml imagecreatefromstring.xml imagecreatefromwbmp.xml imagecreatefromxpm.xml imagecreatetruecolor.xml imageellipse.xml imagefilledarc.xml imagefilledellipse.xml imagefilledpolygon.xml |
||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-2592@lists.php.net to get a copy of this message | ||
dallas Tue Sep 6 16:26:02 2005 EDT
Modified files:
/phpdoc-zh/reference/image/functions imagecreate.xml
imagecreatefromgif.xml
imagecreatefromjpeg.xml
imagecreatefrompng.xml
imagecreatefromstring.xml
imagecreatefromwbmp.xml
imagecreatefromxpm.xml
imagecreatetruecolor.xml
imageellipse.xml
imagefilledarc.xml
imagefilledellipse.xml
imagefilledpolygon.xml
Log:
Updated.
http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreate.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreate.xml diff -u phpdoc-zh/reference/image/functions/imagecreate.xml:1.1 phpdoc-zh/reference/image/functions/imagecreate.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreate.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreate.xml Tue Sep 6 16:26:00 2005 @@ -1,51 +1,51 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreate"> - <refnamediv> - <refname>imagecreate</refname> - <refpurpose>н¨Ò»¸ö»ùÓÚµ÷É«°åµÄͼÏñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreate</methodname> - <methodparam><type>int</type><parameter>x_size</parameter></methodparam> - <methodparam><type>int</type><parameter>y_size</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreate</function> ·µ»ØÒ»¸öͼÏñ±êʶ·û£¬´ú±íÁËÒ»·ù´óСΪ - <parameter>x_size</parameter> ºÍ <parameter>y_size</parameter> µÄ¿Õ°×ͼÏñ¡£ - </para> - <para> - ÍÆ¼öʹÓà <function>imagecreatetruecolor</function>¡£ - </para> - <para> - <example> - <title>н¨Ò»¸öÐ嵀 GD ͼÏñÁ÷²¢Êä³öͼÏñ</title> - <programlisting role="php"> +<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreate"> + <refnamediv> + <refname>imagecreate</refname> + <refpurpose>н¨Ò»¸ö»ùÓÚµ÷É«°åµÄͼÏñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreate</methodname> + <methodparam><type>int</type><parameter>x_size</parameter></methodparam> + <methodparam><type>int</type><parameter>y_size</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreate</function> ·µ»ØÒ»¸öͼÏñ±êʶ·û£¬´ú±íÁËÒ»·ù´óСΪ + <parameter>x_size</parameter> ºÍ <parameter>y_size</parameter> µÄ¿Õ°×ͼÏñ¡£ + </para> + <para> + ÍÆ¼öʹÓà <function>imagecreatetruecolor</function>¡£ + </para> + <para> + <example> + <title>н¨Ò»¸öÐ嵀 GD ͼÏñÁ÷²¢Êä³öͼÏñ</title> + <programlisting role="php"> <![CDATA[ <?php -header ("Content-type: image/png"); -$im = @imagecreate (50, 100) - or die ("Cannot Initialize new GD image stream"); -$background_color = imagecolorallocate ($im, 255, 255, 255); -$text_color = imagecolorallocate ($im, 233, 14, 91); -imagestring ($im, 1, 5, 5, "A Simple Text String", $text_color); -imagepng ($im); -imagedestroy ($im); +header("Content-type: image/png"); +$im = @imagecreate(100, 50) + or die("Cannot Initialize new GD image stream"); +$background_color = imagecolorallocate($im, 255, 255, 255); +$text_color = imagecolorallocate($im, 233, 14, 91); +imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); +imagepng($im); +imagedestroy($im); ?> ]]> - </programlisting> - </example> - </para> - <para> - ²Î¼û <function>imagedestroy</function> ºÍ - <function>imagecreatetruecolor</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ²Î¼û <function>imagedestroy</function> ºÍ + <function>imagecreatetruecolor</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromgif.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromgif.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromgif.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromgif.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromgif.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromgif.xml Tue Sep 6 16:26:00 2005 @@ -1,58 +1,59 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromgif"> - <refnamediv> - <refname>imagecreatefromgif</refname> - <refpurpose>´Ó GIF Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromgif</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromgif</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefromgif</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>GIF</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.13 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromgif"> + <refnamediv> + <refname>imagecreatefromgif</refname> + <refpurpose>´Ó GIF Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromgif</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromgif</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefromgif</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>GIF</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadGif ($imgname) { - $im = @imagecreatefromgif ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (150, 30); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); +function LoadGif($imgname) +{ + $im = @imagecreatefromgif($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatetruecolor(150, 30); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - <note> - <para> - ²»¹ý´Ó GD ¿â 1.6 ÆðËùÓÐµÄ GIF Ö§³Ö¶¼ÒƳýÁË£¬Èç¹ûʹÓÃÕâЩ GD - ¿âʱ±¾º¯Êý²»¿ÉÓᣠ- </para> - </note> + </programlisting> + </example> + <note> + <para> + ×Ô GD ¿â 1.6 °æÆðËùÓÐµÄ GIF Ö§³Ö¶¼ÒƳýÁË£¬ÓÖÔÚ GD ¿â 2.0.28 + °æÆðÓÖ¼ÓÁË»ØÀ´¡£Èç¹ûʹÓöþÕßÖ®¼ä°æ±¾µÄ GD ¿âʱ±¾º¯Êý²»¿ÉÓᣠ</para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </note> + </para> + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml Tue Sep 6 16:26:00 2005 @@ -1,52 +1,54 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromjpeg"> - <refnamediv> - <refname>imagecreatefromjpeg</refname> - <refpurpose>´Ó JPEG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromjpeg</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromjpeg</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefromjpeg</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>JPEG</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.11 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromjpeg"> + <refnamediv> + <refname>imagecreatefromjpeg</refname> + <refpurpose>´Ó JPEG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromjpeg</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromjpeg</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefromjpeg</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>JPEG</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadJpeg ($imgname) { - $im = @imagecreatefromjpeg ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (150, 30); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); +function LoadJpeg($imgname) +{ + $im = @imagecreatefromjpeg($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatruecolor(150, 30); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - </para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </programlisting> + </example> + </para> + ¬e.config.jpeg; + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefrompng.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefrompng.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefrompng.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefrompng.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefrompng.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefrompng.xml Tue Sep 6 16:26:00 2005 @@ -1,52 +1,53 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefrompng"> - <refnamediv> - <refname>imagecreatefrompng</refname> - <refpurpose>´Ó PNG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefrompng</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefrompng</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefrompng</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>PNG</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefrompng"> + <refnamediv> + <refname>imagecreatefrompng</refname> + <refpurpose>´Ó PNG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefrompng</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefrompng</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefrompng</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>PNG</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadPNG ($imgname) { - $im = @imagecreatefrompng ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (150, 30); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); +function LoadPNG($imgname) +{ + $im = @imagecreatefrompng($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatetruecolor(150, 30); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - </para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </programlisting> + </example> + </para> + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromstring.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromstring.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromstring.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromstring.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromstring.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromstring.xml Tue Sep 6 16:26:00 2005 @@ -1,24 +1,75 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromstring"> - <refnamediv> - <refname>imagecreatefromstring</refname> - <refpurpose>´Ó×Ö·û´®ÖеÄͼÏñÁ÷н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromstring</methodname> - <methodparam><type>string</type><parameter>image</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromstring</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄ×Ö·û´®ÖÐÈ¡µÃµÄͼÏñ¡£ - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromstring"> + <refnamediv> + <refname>imagecreatefromstring</refname> + <refpurpose>´Ó×Ö·û´®ÖеÄͼÏñÁ÷н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromstring</methodname> + <methodparam><type>string</type><parameter>image</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromstring</function> + ·µ»ØÒ»¸öͼÏñ±êʶ·û£¬Æä±í´ïÁË´Ó¸ø¶¨×Ö·û´®µÃÀ´µÄͼÏñ¡£Í¼Ïñ¸ñʽ½«×Ô¶¯¼ì²â£¬Ö»Òª + PHP Ö§³Ö£ºJPEG£¬PNG£¬GIF£¬WBMP ºÍ GD2¡£ + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + ³É¹¦Ôò·µ»ØÍ¼Ïñ×ÊÔ´£¬Èç¹ûͼÏñ¸ñʽ²»Ö§³Ö£¬Êý¾Ý²»ÊÇÈϿɵĸñʽ£¬»òÕßͼÏñÒÑËð»µÔò·µ»Ø + &false;¡£ + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>imagecreatefromstring</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php +$data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl' + . 'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr' + . 'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r' + . '8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg=='; +$data = base64_decode($data); + +$im = imagecreatefromstring($data); +if ($im !== false) { + header('Content-Type: image/png'); + imagepng($im); +} +else { + echo 'An error occured.'; +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>imagecreatefromjpeg</function></member> + <member><function>imagecreatefrompng</function></member> + <member><function>imagecreatefromgif</function></member> + <member><function>imagecreatetruecolor</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml Tue Sep 6 16:26:00 2005 @@ -1,57 +1,54 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromwbmp"> - <refnamediv> - <refname>imagecreatefromwbmp</refname> - <refpurpose>´Ó WBMP Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromwbmp</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromwbmp</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefromwbmp</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>WBMP</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.11 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromwbmp"> + <refnamediv> + <refname>imagecreatefromwbmp</refname> + <refpurpose>´Ó WBMP Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromwbmp</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromwbmp</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefromwbmp</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>WBMP</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadWBMP ($imgname) { - $im = @imagecreatefromwbmp ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (20, 20); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 10, 10, $bgc); +function LoadWBMP($imgname) +{ + $im = @imagecreatefromwbmp($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatetruecolor(20, 20); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 10, 10, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - WBMP Ö§³Ö½öÔÚ PHP ±àÒëʱ¼ÓÈëÁË GD-1.8 »ò¸ü¸ß°æ±¾Ê±²Å¿ÉÓᣠ- </para> - </note> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </programlisting> + </example> + </para> + ¬e.config.wbmp; + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml Tue Sep 6 16:26:00 2005 @@ -1,26 +1,27 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromxpm"> - <refnamediv> - <refname>imagecreatefromxpm</refname> - <refpurpose>´Ó XPM Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromxpm</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromxpm</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> +<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromxpm"> + <refnamediv> + <refname>imagecreatefromxpm</refname> + <refpurpose>´Ó XPM Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromxpm</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromxpm</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + ¬e.bundled.gd; + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml diff -u phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml Tue Sep 6 16:26:00 2005 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> <refentry id="function.imagecreatetruecolor"> <refnamediv> <refname>imagecreatetruecolor</refname> @@ -24,23 +24,19 @@ <programlisting role="php"> <![CDATA[ <?php -header ("Content-type: image/png"); -$im = @imagecreatetruecolor (50, 100) - or die ("Cannot Initialize new GD image stream"); -$text_color = imagecolorallocate ($im, 233, 14, 91); -imagestring ($im, 1, 5, 5, "A Simple Text String", $text_color); -imagepng ($im); -imagedestroy ($im); +header("Content-type: image/png"); +$im = @imagecreatetruecolor(50, 100) + or die("Cannot Initialize new GD image stream"); +$text_color = imagecolorallocate($im, 233, 14, 91); +imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); +imagepng($im); +imagedestroy($im); ?> ]]> </programlisting> </example> </para> - <note> - <para> - ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ²¢ÐèÒª GD 2.0.1 »ò¸ü¸ß°æ±¾¡£ - </para> - </note> + ¬e.gd.2; <note> <para> ±¾º¯Êý²»ÄÜÓÃÓÚ GIF Îļþ¸ñʽ¡£ http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imageellipse.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imageellipse.xml diff -u phpdoc-zh/reference/image/functions/imageellipse.xml:1.1 phpdoc-zh/reference/image/functions/imageellipse.xml:1.2 --- phpdoc-zh/reference/image/functions/imageellipse.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imageellipse.xml Tue Sep 6 16:26:00 2005 @@ -1,39 +1,70 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imageellipse"> - <refnamediv> - <refname>imageellipse</refname> - <refpurpose>»Ò»¸öÍÖÔ²</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imageellipse</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>int</type><parameter>cx</parameter></methodparam> - <methodparam><type>int</type><parameter>cy</parameter></methodparam> - <methodparam><type>int</type><parameter>w</parameter></methodparam> - <methodparam><type>int</type><parameter>h</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - </methodsynopsis> +<!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> +<refentry id="function.imageellipse"> + <refnamediv> + <refname>imageellipse</refname> + <refpurpose>»Ò»¸öÍÖÔ²</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imageellipse</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>int</type><parameter>cx</parameter></methodparam> + <methodparam><type>int</type><parameter>cy</parameter></methodparam> + <methodparam><type>int</type><parameter>w</parameter></methodparam> + <methodparam><type>int</type><parameter>h</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + </methodsynopsis> + <para> + <function>imageellipse</function> ÔÚ <parameter>image</parameter> + Ëù´ú±íµÄͼÏñÖлһ¸öÖÐÐÄΪ + <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ + 0, 0£©µÄÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> + ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿í¶ÈºÍ¸ß¶È£¬ÍÖÔ²µÄÑÕÉ«ÓÉ <parameter>color</parameter> Ö¸¶¨¡£ + </para> + <note> <para> - <function>imageellipse</function> ÔÚ <parameter>image</parameter> - Ëù´ú±íµÄͼÏñÖлһ¸öÖÐÐÄΪ - <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ - 0, 0£©µÄÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> - ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿í¶ÈºÍ¸ß¶È£¬ÍÖÔ²µÄÑÕÉ«ÓÉ <parameter>color</parameter> Ö¸¶¨¡£ - </para> - <note><para> ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ÇÒÐèÒª GD 2.0.2 »ò¸ü¸ß°æ±¾£¬¿ÉÒÔÔÚ <ulink url="&url.gd;">&url.gd;</ulink> »ñµÃ¡£ - </para></note> - <para> - ²Î¼û <function>imagearc</function>¡£ </para> - </refsect1> - </refentry> + </note> + <para> + <example> + <title><function>imageellipse</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php + +// н¨Ò»¸ö¿Õ°×ͼÏñ +$image = imagecreatetruecolor(400, 300); + +// Ìî³ä±³¾°É« +$bg = imagecolorallocate($image, 0, 0, 0); + +// Ñ¡ÔñÍÖÔ²µÄÑÕÉ« +$col_ellipse = imagecolorallocate($image, 255, 255, 255); + +// »Ò»¸öÍÖÔ² +imageellipse($image, 200, 150, 300, 200, $col_ellipse); + +// Êä³öͼÏñ +header("Content-type: image/png"); +imagepng($image); + +?> +]]> + </programlisting> + </example> + </para> + <para> + ²Î¼û <function>imagefilledellipse</function> ºÍ + <function>imagearc</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagefilledarc.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagefilledarc.xml diff -u phpdoc-zh/reference/image/functions/imagefilledarc.xml:1.1 phpdoc-zh/reference/image/functions/imagefilledarc.xml:1.2 --- phpdoc-zh/reference/image/functions/imagefilledarc.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagefilledarc.xml Tue Sep 6 16:26:00 2005 @@ -1,60 +1,57 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imagefilledarc"> - <refnamediv> - <refname>imagefilledarc</refname> - <refpurpose>»Ò»ÍÖÔ²»¡ÇÒÌî³ä</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imagefilledarc</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>int</type><parameter>cx</parameter></methodparam> - <methodparam><type>int</type><parameter>cy</parameter></methodparam> - <methodparam><type>int</type><parameter>w</parameter></methodparam> - <methodparam><type>int</type><parameter>h</parameter></methodparam> - <methodparam><type>int</type><parameter>s</parameter></methodparam> - <methodparam><type>int</type><parameter>e</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - <methodparam><type>int</type><parameter>style</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagefilledarc</function> ÔÚ <parameter>image</parameter> - Ëù´ú±íµÄͼÏñÖÐÒÔ - <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ - 0, 0£©»Ò»ÍÖÔ²»¡¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> - ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß£¬<parameter>s</parameter> ºÍ - <parameter>e</parameter> ²ÎÊýÒԽǶÈÖ¸¶¨ÁËÆðʼºÍ½áÊøµã¡£<parameter>style</parameter> - ¿ÉÒÔÊÇÏÂÁÐÖµ°´Î»»ò£¨OR£©ºóµÄÖµ£º - <orderedlist> - <listitem><simpara><constant>IMG_ARC_PIE</constant></simpara></listitem> - <listitem><simpara><constant>IMG_ARC_CHORD</constant></simpara></listitem> - <listitem><simpara><constant>IMG_ARC_NOFILL</constant></simpara></listitem> - <listitem><simpara><constant>IMG_ARC_EDGED</constant></simpara></listitem> - </orderedlist> - <constant>IMG_ARC_PIE</constant> ºÍ <constant>IMG_ARC_CHORD</constant> - ÊÇ»¥³âµÄ£»<constant>IMG_ARC_CHORD</constant> - Ö»ÊÇÓÃÖ±ÏßÁ¬½ÓÁËÆðʼºÍ½áÊøµã£¬<constant>IMG_ARC_PIE</constant> - Ôò²úÉúÔ²Ðα߽磨Èç¹ûÁ½¸ö¶¼Óã¬<constant>IMG_ARC_CHORD</constant> - ÉúЧ£©¡£<constant>IMG_ARC_NOFILL</constant> - Ö¸Ã÷»¡»òÏÒÖ»ÓÐÂÖÀª£¬²»Ìî³ä¡£<constant>IMG_ARC_EDGED</constant> - Ö¸Ã÷ÓÃÖ±Ïß½«ÆðʼºÍ½áÊøµãÓëÖÐÐĵãÏàÁ¬£¬ºÍ <constant>IMG_ARC_NOFILL</constant> - Ò»ÆðʹÓÃÊÇ»±ý״ͼÂÖÀªµÄºÃ·½·¨£¨¶ø²»ÓÃÌî³ä£©¡£ - </para> - <para> - <example> - <title>´´½¨Ò» 3D Ч¹ûµÄ±ý״ͼ</title> - <programlisting role="php"> +<!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> +<refentry id="function.imagefilledarc"> + <refnamediv> + <refname>imagefilledarc</refname> + <refpurpose>»Ò»ÍÖÔ²»¡ÇÒÌî³ä</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imagefilledarc</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>int</type><parameter>cx</parameter></methodparam> + <methodparam><type>int</type><parameter>cy</parameter></methodparam> + <methodparam><type>int</type><parameter>w</parameter></methodparam> + <methodparam><type>int</type><parameter>h</parameter></methodparam> + <methodparam><type>int</type><parameter>s</parameter></methodparam> + <methodparam><type>int</type><parameter>e</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + <methodparam><type>int</type><parameter>style</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagefilledarc</function> ÔÚ <parameter>image</parameter> + Ëù´ú±íµÄͼÏñÖÐÒÔ + <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ + 0, 0£©»Ò»ÍÖÔ²»¡¡£&return.success;<parameter>w</parameter> ºÍ <parameter>h</parameter> + ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß£¬<parameter>s</parameter> ºÍ + <parameter>e</parameter> ²ÎÊýÒԽǶÈÖ¸¶¨ÁËÆðʼºÍ½áÊøµã¡£<parameter>style</parameter> + ¿ÉÒÔÊÇÏÂÁÐÖµ°´Î»»ò£¨OR£©ºóµÄÖµ£º + <orderedlist> + <listitem><simpara><constant>IMG_ARC_PIE</constant></simpara></listitem> + <listitem><simpara><constant>IMG_ARC_CHORD</constant></simpara></listitem> + <listitem><simpara><constant>IMG_ARC_NOFILL</constant></simpara></listitem> + <listitem><simpara><constant>IMG_ARC_EDGED</constant></simpara></listitem> + </orderedlist> + <constant>IMG_ARC_PIE</constant> ºÍ <constant>IMG_ARC_CHORD</constant> + ÊÇ»¥³âµÄ£»<constant>IMG_ARC_CHORD</constant> + Ö»ÊÇÓÃÖ±ÏßÁ¬½ÓÁËÆðʼºÍ½áÊøµã£¬<constant>IMG_ARC_PIE</constant> + Ôò²úÉúÔ²Ðα߽磨Èç¹ûÁ½¸ö¶¼Óã¬<constant>IMG_ARC_CHORD</constant> + ÉúЧ£©¡£<constant>IMG_ARC_NOFILL</constant> + Ö¸Ã÷»¡»òÏÒÖ»ÓÐÂÖÀª£¬²»Ìî³ä¡£<constant>IMG_ARC_EDGED</constant> + Ö¸Ã÷ÓÃÖ±Ïß½«ÆðʼºÍ½áÊøµãÓëÖÐÐĵãÏàÁ¬£¬ºÍ <constant>IMG_ARC_NOFILL</constant> + Ò»ÆðʹÓÃÊÇ»±ý״ͼÂÖÀªµÄºÃ·½·¨£¨¶ø²»ÓÃÌî³ä£©¡£ + </para> + <para> + <example> + <title>´´½¨Ò» 3D Ч¹ûµÄ±ý״ͼ</title> + <programlisting role="php"> <![CDATA[ <?php - -// this example is provided by poxy at klam dot - // create image -$image = imagecreate(100, 100); +$image = imagecreatetruecolor(100, 100); // allocate some solors $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); @@ -86,11 +83,7 @@ </programlisting> </example> </para> - <note> - <para> - ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ÇÒÐèÒª GD 2.0.1¡£ - </para> - </note> + ¬e.gd.2; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagefilledellipse.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagefilledellipse.xml diff -u phpdoc-zh/reference/image/functions/imagefilledellipse.xml:1.1 phpdoc-zh/reference/image/functions/imagefilledellipse.xml:1.2 --- phpdoc-zh/reference/image/functions/imagefilledellipse.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagefilledellipse.xml Tue Sep 6 16:26:00 2005 @@ -1,40 +1,65 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imagefilledellipse"> - <refnamediv> - <refname>imagefilledellipse</refname> - <refpurpose>»Ò»ÍÖÔ²²¢Ìî³ä</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imagefilledellipse</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>int</type><parameter>cx</parameter></methodparam> - <methodparam><type>int</type><parameter>cy</parameter></methodparam> - <methodparam><type>int</type><parameter>w</parameter></methodparam> - <methodparam><type>int</type><parameter>h</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagefilledellipse</function> ÔÚ - <parameter>image</parameter> Ëù´ú±íµÄͼÏñÖÐÒÔ - <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ - 0, 0£©ÎªÖÐÐĻһ¸öÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> - ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß¡£ÍÖÔ²Óà <parameter>color</parameter> ÑÕÉ«Ìî³ä¡£ - </para> - <note> - <para> - ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ²¢ÐèÒª GD 2.0.1 »ò¸ü¸ß°æ±¾¡£ - </para> - </note> - <para> - ²Î¼û <function>imagefilledarc</function>¡£ - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.12 Maintainer: dallas Status: ready --> +<refentry id="function.imagefilledellipse"> + <refnamediv> + <refname>imagefilledellipse</refname> + <refpurpose>»Ò»ÍÖÔ²²¢Ìî³ä</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imagefilledellipse</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>int</type><parameter>cx</parameter></methodparam> + <methodparam><type>int</type><parameter>cy</parameter></methodparam> + <methodparam><type>int</type><parameter>w</parameter></methodparam> + <methodparam><type>int</type><parameter>h</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagefilledellipse</function> ÔÚ + <parameter>image</parameter> Ëù´ú±íµÄͼÏñÖÐÒÔ + <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ + 0, 0£©ÎªÖÐÐĻһ¸öÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> + ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß¡£ÍÖÔ²Óà <parameter>color</parameter> ÑÕÉ«Ìî³ä¡£&return.success; + </para> + <para> + <example> + <title><function>imagefilledellipse</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php + +// create a blank image +$image = imagecreatetruecolor(400, 300); + +// fill the background color +$bg = imagecolorallocate($image, 0, 0, 0); + +// choose a color for the ellipse +$col_ellipse = imagecolorallocate($image, 255, 255, 255); + +// draw the white ellipse +imagefilledellipse($image, 200, 150, 300, 200, $col_ellipse); + +// output the picture +header("Content-type: image/png"); +imagepng($image); + +?> +]]> + </programlisting> + </example> + </para> + ¬e.gd.2; + <para> + ²Î¼û <function>imageellipse</function> ºÍ + <function>imagefilledarc</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagefilledpolygon.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagefilledpolygon.xml diff -u phpdoc-zh/reference/image/functions/imagefilledpolygon.xml:1.1 phpdoc-zh/reference/image/functions/imagefilledpolygon.xml:1.2 --- phpdoc-zh/reference/image/functions/imagefilledpolygon.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagefilledpolygon.xml Tue Sep 6 16:26:00 2005 @@ -1,75 +1,70 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imagefilledpolygon"> - <refnamediv> - <refname>imagefilledpolygon</refname> - <refpurpose>»Ò»¶à±ßÐβ¢Ìî³ä</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imagefilledpolygon</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>array</type><parameter>points</parameter></methodparam> - <methodparam><type>int</type><parameter>num_points</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagefilledpolygon</function> ÔÚ <parameter>image</parameter> - ͼÏñÖлһ¸öÌî³äÁ˵Ķà±ßÐΡ£<parameter>points</parameter> - ÊÇÒ»¸ö PHP µÄÊý×飬°üº¬Á˶à±ßÐεĸ÷¸ö¶¥µã×ø±ê£¬¼´ points[0] - = x0£¬points[1] = y0£¬points[2] - = x1£¬points[3] = y1£¬ÒÔ´ËÀàÍÆ¡£<parameter>num_points</parameter> ÊǶ¥µãµÄ×ÜÊý¡£ - </para> - <para> - <example> - <title><function>imagefilledpolygon</function> Àý×Ó</title> - <programlisting role="php"> +<!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> +<refentry id="function.imagefilledpolygon"> + <refnamediv> + <refname>imagefilledpolygon</refname> + <refpurpose>»Ò»¶à±ßÐβ¢Ìî³ä</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imagefilledpolygon</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>array</type><parameter>points</parameter></methodparam> + <methodparam><type>int</type><parameter>num_points</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagefilledpolygon</function> ÔÚ <parameter>image</parameter> + ͼÏñÖлһ¸öÌî³äÁ˵Ķà±ßÐΡ£ + </para> + <para> + <parameter>points</parameter> ²ÎÊýÊÇÒ»¸ö°´Ë³Ðò°üº¬Óжà±ßÐθ÷¶¥µãµÄ + <literal>x</literal> ºÍ <literal>y</literal> + ×ø±êµÄÊý×é¡£ + </para> + <para> + <parameter>num_points</parameter> ²ÎÊýÊǶ¥µãµÄ×ÜÊý£¬±ØÐë´óÓÚ 3¡£ + </para> + <para> + <example> + <title><function>imagefilledpolygon</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php - -// this example is provided by ecofarm at mullum dot com dot au - -// set up array of points for polygon +// ½¨Á¢¶à±ßÐθ÷¶¥µã×ø±êµÄÊý×é $values = array( - 0 => 40, // x1 - 1 => 50, // y1 - 2 => 20, // x2 - 3 => 240, // y2 - 4 => 60, // x3 - 5 => 60, // y3 - 6 => 240, // x4 - 7 => 20, // y4 - 8 => 50, // x5 - 9 => 40, // y5 - 10 => 10, // x6 - 11 => 10, // y6 -); - -// create image -$im = imagecreate(250, 250); + 40, 50, // Point 1 (x, y) + 20, 240, // Point 2 (x, y) + 60, 60, // Point 3 (x, y) + 240, 20, // Point 4 (x, y) + 50, 40, // Point 5 (x, y) + 10, 10 // Point 6 (x, y) + ); + +// ´´½¨Í¼Ïñ +$image = imagecreatetruecolor(250, 250); + +// É趨ÑÕÉ« +$bg = imagecolorallocate($image, 200, 200, 200); +$blue = imagecolorallocate($image, 0, 0, 255); -// some colors -$bg = imagecolorallocate($im, 255, 255, 255); -$blue = imagecolorallocate($im, 0, 0, 255); +// »Ò»¸ö¶à±ßÐÎ +imagefilledpolygon($image, $values, 6, $blue); -// draw a polygon -imagefilledpolygon($im, $values, 6, $blue ); - -// flush image +// Êä³öͼÏñ header('Content-type: image/png'); -imagepng($im); -imagedestroy($im); - +imagepng($image); +imagedestroy($image); ?> ]]> - </programlisting> - </example> - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables:
http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreate.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreate.xml diff -u phpdoc-zh/reference/image/functions/imagecreate.xml:1.1 phpdoc-zh/reference/image/functions/imagecreate.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreate.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreate.xml Tue Sep 6 16:26:00 2005 @@ -1,51 +1,51 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreate"> - <refnamediv> - <refname>imagecreate</refname> - <refpurpose>н¨Ò»¸ö»ùÓÚµ÷É«°åµÄͼÏñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreate</methodname> - <methodparam><type>int</type><parameter>x_size</parameter></methodparam> - <methodparam><type>int</type><parameter>y_size</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreate</function> ·µ»ØÒ»¸öͼÏñ±êʶ·û£¬´ú±íÁËÒ»·ù´óСΪ - <parameter>x_size</parameter> ºÍ <parameter>y_size</parameter> µÄ¿Õ°×ͼÏñ¡£ - </para> - <para> - ÍÆ¼öʹÓà <function>imagecreatetruecolor</function>¡£ - </para> - <para> - <example> - <title>н¨Ò»¸öÐ嵀 GD ͼÏñÁ÷²¢Êä³öͼÏñ</title> - <programlisting role="php"> +<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreate"> + <refnamediv> + <refname>imagecreate</refname> + <refpurpose>н¨Ò»¸ö»ùÓÚµ÷É«°åµÄͼÏñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreate</methodname> + <methodparam><type>int</type><parameter>x_size</parameter></methodparam> + <methodparam><type>int</type><parameter>y_size</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreate</function> ·µ»ØÒ»¸öͼÏñ±êʶ·û£¬´ú±íÁËÒ»·ù´óСΪ + <parameter>x_size</parameter> ºÍ <parameter>y_size</parameter> µÄ¿Õ°×ͼÏñ¡£ + </para> + <para> + ÍÆ¼öʹÓà <function>imagecreatetruecolor</function>¡£ + </para> + <para> + <example> + <title>н¨Ò»¸öÐ嵀 GD ͼÏñÁ÷²¢Êä³öͼÏñ</title> + <programlisting role="php"> <![CDATA[ <?php -header ("Content-type: image/png"); -$im = @imagecreate (50, 100) - or die ("Cannot Initialize new GD image stream"); -$background_color = imagecolorallocate ($im, 255, 255, 255); -$text_color = imagecolorallocate ($im, 233, 14, 91); -imagestring ($im, 1, 5, 5, "A Simple Text String", $text_color); -imagepng ($im); -imagedestroy ($im); +header("Content-type: image/png"); +$im = @imagecreate(100, 50) + or die("Cannot Initialize new GD image stream"); +$background_color = imagecolorallocate($im, 255, 255, 255); +$text_color = imagecolorallocate($im, 233, 14, 91); +imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); +imagepng($im); +imagedestroy($im); ?> ]]> - </programlisting> - </example> - </para> - <para> - ²Î¼û <function>imagedestroy</function> ºÍ - <function>imagecreatetruecolor</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ²Î¼û <function>imagedestroy</function> ºÍ + <function>imagecreatetruecolor</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromgif.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromgif.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromgif.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromgif.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromgif.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromgif.xml Tue Sep 6 16:26:00 2005 @@ -1,58 +1,59 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromgif"> - <refnamediv> - <refname>imagecreatefromgif</refname> - <refpurpose>´Ó GIF Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromgif</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromgif</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefromgif</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>GIF</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.13 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromgif"> + <refnamediv> + <refname>imagecreatefromgif</refname> + <refpurpose>´Ó GIF Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromgif</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromgif</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefromgif</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>GIF</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadGif ($imgname) { - $im = @imagecreatefromgif ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (150, 30); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); +function LoadGif($imgname) +{ + $im = @imagecreatefromgif($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatetruecolor(150, 30); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - <note> - <para> - ²»¹ý´Ó GD ¿â 1.6 ÆðËùÓÐµÄ GIF Ö§³Ö¶¼ÒƳýÁË£¬Èç¹ûʹÓÃÕâЩ GD - ¿âʱ±¾º¯Êý²»¿ÉÓᣠ- </para> - </note> + </programlisting> + </example> + <note> + <para> + ×Ô GD ¿â 1.6 °æÆðËùÓÐµÄ GIF Ö§³Ö¶¼ÒƳýÁË£¬ÓÖÔÚ GD ¿â 2.0.28 + °æÆðÓÖ¼ÓÁË»ØÀ´¡£Èç¹ûʹÓöþÕßÖ®¼ä°æ±¾µÄ GD ¿âʱ±¾º¯Êý²»¿ÉÓᣠ</para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </note> + </para> + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromjpeg.xml Tue Sep 6 16:26:00 2005 @@ -1,52 +1,54 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromjpeg"> - <refnamediv> - <refname>imagecreatefromjpeg</refname> - <refpurpose>´Ó JPEG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromjpeg</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromjpeg</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefromjpeg</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>JPEG</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.11 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromjpeg"> + <refnamediv> + <refname>imagecreatefromjpeg</refname> + <refpurpose>´Ó JPEG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromjpeg</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromjpeg</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefromjpeg</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>JPEG</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadJpeg ($imgname) { - $im = @imagecreatefromjpeg ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (150, 30); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); +function LoadJpeg($imgname) +{ + $im = @imagecreatefromjpeg($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatruecolor(150, 30); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - </para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </programlisting> + </example> + </para> + ¬e.config.jpeg; + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefrompng.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefrompng.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefrompng.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefrompng.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefrompng.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefrompng.xml Tue Sep 6 16:26:00 2005 @@ -1,52 +1,53 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefrompng"> - <refnamediv> - <refname>imagecreatefrompng</refname> - <refpurpose>´Ó PNG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefrompng</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefrompng</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefrompng</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>PNG</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefrompng"> + <refnamediv> + <refname>imagecreatefrompng</refname> + <refpurpose>´Ó PNG Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefrompng</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefrompng</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefrompng</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>PNG</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadPNG ($imgname) { - $im = @imagecreatefrompng ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (150, 30); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 150, 30, $bgc); +function LoadPNG($imgname) +{ + $im = @imagecreatefrompng($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatetruecolor(150, 30); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - </para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </programlisting> + </example> + </para> + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromstring.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromstring.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromstring.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromstring.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromstring.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromstring.xml Tue Sep 6 16:26:00 2005 @@ -1,24 +1,75 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromstring"> - <refnamediv> - <refname>imagecreatefromstring</refname> - <refpurpose>´Ó×Ö·û´®ÖеÄͼÏñÁ÷н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromstring</methodname> - <methodparam><type>string</type><parameter>image</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromstring</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄ×Ö·û´®ÖÐÈ¡µÃµÄͼÏñ¡£ - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromstring"> + <refnamediv> + <refname>imagecreatefromstring</refname> + <refpurpose>´Ó×Ö·û´®ÖеÄͼÏñÁ÷н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromstring</methodname> + <methodparam><type>string</type><parameter>image</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromstring</function> + ·µ»ØÒ»¸öͼÏñ±êʶ·û£¬Æä±í´ïÁË´Ó¸ø¶¨×Ö·û´®µÃÀ´µÄͼÏñ¡£Í¼Ïñ¸ñʽ½«×Ô¶¯¼ì²â£¬Ö»Òª + PHP Ö§³Ö£ºJPEG£¬PNG£¬GIF£¬WBMP ºÍ GD2¡£ + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + ³É¹¦Ôò·µ»ØÍ¼Ïñ×ÊÔ´£¬Èç¹ûͼÏñ¸ñʽ²»Ö§³Ö£¬Êý¾Ý²»ÊÇÈϿɵĸñʽ£¬»òÕßͼÏñÒÑËð»µÔò·µ»Ø + &false;¡£ + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>imagecreatefromstring</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php +$data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl' + . 'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr' + . 'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r' + . '8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg=='; +$data = base64_decode($data); + +$im = imagecreatefromstring($data); +if ($im !== false) { + header('Content-Type: image/png'); + imagepng($im); +} +else { + echo 'An error occured.'; +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>imagecreatefromjpeg</function></member> + <member><function>imagecreatefrompng</function></member> + <member><function>imagecreatefromgif</function></member> + <member><function>imagecreatetruecolor</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromwbmp.xml Tue Sep 6 16:26:00 2005 @@ -1,57 +1,54 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromwbmp"> - <refnamediv> - <refname>imagecreatefromwbmp</refname> - <refpurpose>´Ó WBMP Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromwbmp</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromwbmp</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - <para> - <function>imagecreatefromwbmp</function> - ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó - <acronym>WBMP</acronym>£º - <example> - <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó£¨courtesy vic at zymsys dot com£©</title> - <programlisting role="php"> +<!-- EN-Revision: 1.11 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromwbmp"> + <refnamediv> + <refname>imagecreatefromwbmp</refname> + <refpurpose>´Ó WBMP Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromwbmp</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromwbmp</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + <para> + <function>imagecreatefromwbmp</function> + ÔÚʧ°Üʱ·µ»ØÒ»¸ö¿Õ×Ö·û´®£¬²¢ÇÒÊä³öÒ»Ìõ´íÎóÐÅÏ¢£¬²»ÐÒµØÔÚä¯ÀÀÆ÷ÖÐÏÔʾΪ¶ÏÁ´½Ó¡£Îª¼õÇáµ÷ÊÔ¹¤×÷ÏÂÃæµÄÀý×Ó»á²úÉúÒ»¸ö´íÎó + <acronym>WBMP</acronym>£º + <example> + <title>´¦Àí´´½¨¹ý³ÌÖеĴíÎó</title> + <programlisting role="php"> <![CDATA[ <?php -function LoadWBMP ($imgname) { - $im = @imagecreatefromwbmp ($imgname); /* Attempt to open */ - if (!$im) { /* See if it failed */ - $im = imagecreate (20, 20); /* Create a blank image */ - $bgc = imagecolorallocate ($im, 255, 255, 255); - $tc = imagecolorallocate ($im, 0, 0, 0); - imagefilledrectangle ($im, 0, 0, 10, 10, $bgc); +function LoadWBMP($imgname) +{ + $im = @imagecreatefromwbmp($imgname); /* Attempt to open */ + if(!$im) { /* See if it failed */ + $im = imagecreatetruecolor(20, 20); /* Create a blank image */ + $bgc = imagecolorallocate($im, 255, 255, 255); + $tc = imagecolorallocate($im, 0, 0, 0); + imagefilledrectangle($im, 0, 0, 10, 10, $bgc); /* Output an errmsg */ - imagestring ($im, 1, 5, 5, "Error loading $imgname", $tc); + imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - WBMP Ö§³Ö½öÔÚ PHP ±àÒëʱ¼ÓÈëÁË GD-1.8 »ò¸ü¸ß°æ±¾Ê±²Å¿ÉÓᣠ- </para> - </note> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> + </programlisting> + </example> + </para> + ¬e.config.wbmp; + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml diff -u phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatefromxpm.xml Tue Sep 6 16:26:00 2005 @@ -1,26 +1,27 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> - <refentry id="function.imagecreatefromxpm"> - <refnamediv> - <refname>imagecreatefromxpm</refname> - <refpurpose>´Ó XPM Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>imagecreatefromxpm</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagecreatefromxpm</function> - ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ - </para> - &tip.fopen-wrapper; - &warn.no-win32-fopen-wrapper; - </refsect1> - </refentry> +<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> +<refentry id="function.imagecreatefromxpm"> + <refnamediv> + <refname>imagecreatefromxpm</refname> + <refpurpose>´Ó XPM Îļþ»ò URL н¨Ò»Í¼Ïñ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>imagecreatefromxpm</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagecreatefromxpm</function> + ·µ»ØÒ»Í¼Ïñ±êʶ·û£¬´ú±íÁË´Ó¸ø¶¨µÄÎļþÃûÈ¡µÃµÄͼÏñ¡£ + </para> + ¬e.bundled.gd; + &tip.fopen-wrapper; + &warn.no-win32-fopen-wrapper; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml diff -u phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml:1.1 phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml:1.2 --- phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagecreatetruecolor.xml Tue Sep 6 16:26:00 2005 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> <refentry id="function.imagecreatetruecolor"> <refnamediv> <refname>imagecreatetruecolor</refname> @@ -24,23 +24,19 @@ <programlisting role="php"> <![CDATA[ <?php -header ("Content-type: image/png"); -$im = @imagecreatetruecolor (50, 100) - or die ("Cannot Initialize new GD image stream"); -$text_color = imagecolorallocate ($im, 233, 14, 91); -imagestring ($im, 1, 5, 5, "A Simple Text String", $text_color); -imagepng ($im); -imagedestroy ($im); +header("Content-type: image/png"); +$im = @imagecreatetruecolor(50, 100) + or die("Cannot Initialize new GD image stream"); +$text_color = imagecolorallocate($im, 233, 14, 91); +imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); +imagepng($im); +imagedestroy($im); ?> ]]> </programlisting> </example> </para> - <note> - <para> - ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ²¢ÐèÒª GD 2.0.1 »ò¸ü¸ß°æ±¾¡£ - </para> - </note> + ¬e.gd.2; <note> <para> ±¾º¯Êý²»ÄÜÓÃÓÚ GIF Îļþ¸ñʽ¡£ http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imageellipse.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imageellipse.xml diff -u phpdoc-zh/reference/image/functions/imageellipse.xml:1.1 phpdoc-zh/reference/image/functions/imageellipse.xml:1.2 --- phpdoc-zh/reference/image/functions/imageellipse.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imageellipse.xml Tue Sep 6 16:26:00 2005 @@ -1,39 +1,70 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imageellipse"> - <refnamediv> - <refname>imageellipse</refname> - <refpurpose>»Ò»¸öÍÖÔ²</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imageellipse</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>int</type><parameter>cx</parameter></methodparam> - <methodparam><type>int</type><parameter>cy</parameter></methodparam> - <methodparam><type>int</type><parameter>w</parameter></methodparam> - <methodparam><type>int</type><parameter>h</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - </methodsynopsis> +<!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> +<refentry id="function.imageellipse"> + <refnamediv> + <refname>imageellipse</refname> + <refpurpose>»Ò»¸öÍÖÔ²</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imageellipse</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>int</type><parameter>cx</parameter></methodparam> + <methodparam><type>int</type><parameter>cy</parameter></methodparam> + <methodparam><type>int</type><parameter>w</parameter></methodparam> + <methodparam><type>int</type><parameter>h</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + </methodsynopsis> + <para> + <function>imageellipse</function> ÔÚ <parameter>image</parameter> + Ëù´ú±íµÄͼÏñÖлһ¸öÖÐÐÄΪ + <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ + 0, 0£©µÄÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> + ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿í¶ÈºÍ¸ß¶È£¬ÍÖÔ²µÄÑÕÉ«ÓÉ <parameter>color</parameter> Ö¸¶¨¡£ + </para> + <note> <para> - <function>imageellipse</function> ÔÚ <parameter>image</parameter> - Ëù´ú±íµÄͼÏñÖлһ¸öÖÐÐÄΪ - <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ - 0, 0£©µÄÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> - ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿í¶ÈºÍ¸ß¶È£¬ÍÖÔ²µÄÑÕÉ«ÓÉ <parameter>color</parameter> Ö¸¶¨¡£ - </para> - <note><para> ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ÇÒÐèÒª GD 2.0.2 »ò¸ü¸ß°æ±¾£¬¿ÉÒÔÔÚ <ulink url="&url.gd;">&url.gd;</ulink> »ñµÃ¡£ - </para></note> - <para> - ²Î¼û <function>imagearc</function>¡£ </para> - </refsect1> - </refentry> + </note> + <para> + <example> + <title><function>imageellipse</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php + +// н¨Ò»¸ö¿Õ°×ͼÏñ +$image = imagecreatetruecolor(400, 300); + +// Ìî³ä±³¾°É« +$bg = imagecolorallocate($image, 0, 0, 0); + +// Ñ¡ÔñÍÖÔ²µÄÑÕÉ« +$col_ellipse = imagecolorallocate($image, 255, 255, 255); + +// »Ò»¸öÍÖÔ² +imageellipse($image, 200, 150, 300, 200, $col_ellipse); + +// Êä³öͼÏñ +header("Content-type: image/png"); +imagepng($image); + +?> +]]> + </programlisting> + </example> + </para> + <para> + ²Î¼û <function>imagefilledellipse</function> ºÍ + <function>imagearc</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagefilledarc.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagefilledarc.xml diff -u phpdoc-zh/reference/image/functions/imagefilledarc.xml:1.1 phpdoc-zh/reference/image/functions/imagefilledarc.xml:1.2 --- phpdoc-zh/reference/image/functions/imagefilledarc.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagefilledarc.xml Tue Sep 6 16:26:00 2005 @@ -1,60 +1,57 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imagefilledarc"> - <refnamediv> - <refname>imagefilledarc</refname> - <refpurpose>»Ò»ÍÖÔ²»¡ÇÒÌî³ä</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imagefilledarc</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>int</type><parameter>cx</parameter></methodparam> - <methodparam><type>int</type><parameter>cy</parameter></methodparam> - <methodparam><type>int</type><parameter>w</parameter></methodparam> - <methodparam><type>int</type><parameter>h</parameter></methodparam> - <methodparam><type>int</type><parameter>s</parameter></methodparam> - <methodparam><type>int</type><parameter>e</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - <methodparam><type>int</type><parameter>style</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagefilledarc</function> ÔÚ <parameter>image</parameter> - Ëù´ú±íµÄͼÏñÖÐÒÔ - <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ - 0, 0£©»Ò»ÍÖÔ²»¡¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> - ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß£¬<parameter>s</parameter> ºÍ - <parameter>e</parameter> ²ÎÊýÒԽǶÈÖ¸¶¨ÁËÆðʼºÍ½áÊøµã¡£<parameter>style</parameter> - ¿ÉÒÔÊÇÏÂÁÐÖµ°´Î»»ò£¨OR£©ºóµÄÖµ£º - <orderedlist> - <listitem><simpara><constant>IMG_ARC_PIE</constant></simpara></listitem> - <listitem><simpara><constant>IMG_ARC_CHORD</constant></simpara></listitem> - <listitem><simpara><constant>IMG_ARC_NOFILL</constant></simpara></listitem> - <listitem><simpara><constant>IMG_ARC_EDGED</constant></simpara></listitem> - </orderedlist> - <constant>IMG_ARC_PIE</constant> ºÍ <constant>IMG_ARC_CHORD</constant> - ÊÇ»¥³âµÄ£»<constant>IMG_ARC_CHORD</constant> - Ö»ÊÇÓÃÖ±ÏßÁ¬½ÓÁËÆðʼºÍ½áÊøµã£¬<constant>IMG_ARC_PIE</constant> - Ôò²úÉúÔ²Ðα߽磨Èç¹ûÁ½¸ö¶¼Óã¬<constant>IMG_ARC_CHORD</constant> - ÉúЧ£©¡£<constant>IMG_ARC_NOFILL</constant> - Ö¸Ã÷»¡»òÏÒÖ»ÓÐÂÖÀª£¬²»Ìî³ä¡£<constant>IMG_ARC_EDGED</constant> - Ö¸Ã÷ÓÃÖ±Ïß½«ÆðʼºÍ½áÊøµãÓëÖÐÐĵãÏàÁ¬£¬ºÍ <constant>IMG_ARC_NOFILL</constant> - Ò»ÆðʹÓÃÊÇ»±ý״ͼÂÖÀªµÄºÃ·½·¨£¨¶ø²»ÓÃÌî³ä£©¡£ - </para> - <para> - <example> - <title>´´½¨Ò» 3D Ч¹ûµÄ±ý״ͼ</title> - <programlisting role="php"> +<!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> +<refentry id="function.imagefilledarc"> + <refnamediv> + <refname>imagefilledarc</refname> + <refpurpose>»Ò»ÍÖÔ²»¡ÇÒÌî³ä</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imagefilledarc</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>int</type><parameter>cx</parameter></methodparam> + <methodparam><type>int</type><parameter>cy</parameter></methodparam> + <methodparam><type>int</type><parameter>w</parameter></methodparam> + <methodparam><type>int</type><parameter>h</parameter></methodparam> + <methodparam><type>int</type><parameter>s</parameter></methodparam> + <methodparam><type>int</type><parameter>e</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + <methodparam><type>int</type><parameter>style</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagefilledarc</function> ÔÚ <parameter>image</parameter> + Ëù´ú±íµÄͼÏñÖÐÒÔ + <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ + 0, 0£©»Ò»ÍÖÔ²»¡¡£&return.success;<parameter>w</parameter> ºÍ <parameter>h</parameter> + ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß£¬<parameter>s</parameter> ºÍ + <parameter>e</parameter> ²ÎÊýÒԽǶÈÖ¸¶¨ÁËÆðʼºÍ½áÊøµã¡£<parameter>style</parameter> + ¿ÉÒÔÊÇÏÂÁÐÖµ°´Î»»ò£¨OR£©ºóµÄÖµ£º + <orderedlist> + <listitem><simpara><constant>IMG_ARC_PIE</constant></simpara></listitem> + <listitem><simpara><constant>IMG_ARC_CHORD</constant></simpara></listitem> + <listitem><simpara><constant>IMG_ARC_NOFILL</constant></simpara></listitem> + <listitem><simpara><constant>IMG_ARC_EDGED</constant></simpara></listitem> + </orderedlist> + <constant>IMG_ARC_PIE</constant> ºÍ <constant>IMG_ARC_CHORD</constant> + ÊÇ»¥³âµÄ£»<constant>IMG_ARC_CHORD</constant> + Ö»ÊÇÓÃÖ±ÏßÁ¬½ÓÁËÆðʼºÍ½áÊøµã£¬<constant>IMG_ARC_PIE</constant> + Ôò²úÉúÔ²Ðα߽磨Èç¹ûÁ½¸ö¶¼Óã¬<constant>IMG_ARC_CHORD</constant> + ÉúЧ£©¡£<constant>IMG_ARC_NOFILL</constant> + Ö¸Ã÷»¡»òÏÒÖ»ÓÐÂÖÀª£¬²»Ìî³ä¡£<constant>IMG_ARC_EDGED</constant> + Ö¸Ã÷ÓÃÖ±Ïß½«ÆðʼºÍ½áÊøµãÓëÖÐÐĵãÏàÁ¬£¬ºÍ <constant>IMG_ARC_NOFILL</constant> + Ò»ÆðʹÓÃÊÇ»±ý״ͼÂÖÀªµÄºÃ·½·¨£¨¶ø²»ÓÃÌî³ä£©¡£ + </para> + <para> + <example> + <title>´´½¨Ò» 3D Ч¹ûµÄ±ý״ͼ</title> + <programlisting role="php"> <![CDATA[ <?php - -// this example is provided by poxy at klam dot - // create image -$image = imagecreate(100, 100); +$image = imagecreatetruecolor(100, 100); // allocate some solors $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); @@ -86,11 +83,7 @@ </programlisting> </example> </para> - <note> - <para> - ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ÇÒÐèÒª GD 2.0.1¡£ - </para> - </note> + ¬e.gd.2; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagefilledellipse.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagefilledellipse.xml diff -u phpdoc-zh/reference/image/functions/imagefilledellipse.xml:1.1 phpdoc-zh/reference/image/functions/imagefilledellipse.xml:1.2 --- phpdoc-zh/reference/image/functions/imagefilledellipse.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagefilledellipse.xml Tue Sep 6 16:26:00 2005 @@ -1,40 +1,65 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imagefilledellipse"> - <refnamediv> - <refname>imagefilledellipse</refname> - <refpurpose>»Ò»ÍÖÔ²²¢Ìî³ä</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imagefilledellipse</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>int</type><parameter>cx</parameter></methodparam> - <methodparam><type>int</type><parameter>cy</parameter></methodparam> - <methodparam><type>int</type><parameter>w</parameter></methodparam> - <methodparam><type>int</type><parameter>h</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagefilledellipse</function> ÔÚ - <parameter>image</parameter> Ëù´ú±íµÄͼÏñÖÐÒÔ - <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ - 0, 0£©ÎªÖÐÐĻһ¸öÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> - ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß¡£ÍÖÔ²Óà <parameter>color</parameter> ÑÕÉ«Ìî³ä¡£ - </para> - <note> - <para> - ±¾º¯ÊýÌí¼ÓÓÚ PHP 4.0.6 ²¢ÐèÒª GD 2.0.1 »ò¸ü¸ß°æ±¾¡£ - </para> - </note> - <para> - ²Î¼û <function>imagefilledarc</function>¡£ - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.12 Maintainer: dallas Status: ready --> +<refentry id="function.imagefilledellipse"> + <refnamediv> + <refname>imagefilledellipse</refname> + <refpurpose>»Ò»ÍÖÔ²²¢Ìî³ä</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imagefilledellipse</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>int</type><parameter>cx</parameter></methodparam> + <methodparam><type>int</type><parameter>cy</parameter></methodparam> + <methodparam><type>int</type><parameter>w</parameter></methodparam> + <methodparam><type>int</type><parameter>h</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagefilledellipse</function> ÔÚ + <parameter>image</parameter> Ëù´ú±íµÄͼÏñÖÐÒÔ + <parameter>cx</parameter>£¬<parameter>cy</parameter>£¨Í¼Ïñ×óÉϽÇΪ + 0, 0£©ÎªÖÐÐĻһ¸öÍÖÔ²¡£<parameter>w</parameter> ºÍ <parameter>h</parameter> + ·Ö±ðÖ¸¶¨ÁËÍÖÔ²µÄ¿íºÍ¸ß¡£ÍÖÔ²Óà <parameter>color</parameter> ÑÕÉ«Ìî³ä¡£&return.success; + </para> + <para> + <example> + <title><function>imagefilledellipse</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php + +// create a blank image +$image = imagecreatetruecolor(400, 300); + +// fill the background color +$bg = imagecolorallocate($image, 0, 0, 0); + +// choose a color for the ellipse +$col_ellipse = imagecolorallocate($image, 255, 255, 255); + +// draw the white ellipse +imagefilledellipse($image, 200, 150, 300, 200, $col_ellipse); + +// output the picture +header("Content-type: image/png"); +imagepng($image); + +?> +]]> + </programlisting> + </example> + </para> + ¬e.gd.2; + <para> + ²Î¼û <function>imageellipse</function> ºÍ + <function>imagefilledarc</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/image/functions/imagefilledpolygon.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/image/functions/imagefilledpolygon.xml diff -u phpdoc-zh/reference/image/functions/imagefilledpolygon.xml:1.1 phpdoc-zh/reference/image/functions/imagefilledpolygon.xml:1.2 --- phpdoc-zh/reference/image/functions/imagefilledpolygon.xml:1.1 Thu Aug 28 00:08:14 2003 +++ phpdoc-zh/reference/image/functions/imagefilledpolygon.xml Tue Sep 6 16:26:00 2005 @@ -1,75 +1,70 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.imagefilledpolygon"> - <refnamediv> - <refname>imagefilledpolygon</refname> - <refpurpose>»Ò»¶à±ßÐβ¢Ìî³ä</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>imagefilledpolygon</methodname> - <methodparam><type>resource</type><parameter>image</parameter></methodparam> - <methodparam><type>array</type><parameter>points</parameter></methodparam> - <methodparam><type>int</type><parameter>num_points</parameter></methodparam> - <methodparam><type>int</type><parameter>color</parameter></methodparam> - </methodsynopsis> - <para> - <function>imagefilledpolygon</function> ÔÚ <parameter>image</parameter> - ͼÏñÖлһ¸öÌî³äÁ˵Ķà±ßÐΡ£<parameter>points</parameter> - ÊÇÒ»¸ö PHP µÄÊý×飬°üº¬Á˶à±ßÐεĸ÷¸ö¶¥µã×ø±ê£¬¼´ points[0] - = x0£¬points[1] = y0£¬points[2] - = x1£¬points[3] = y1£¬ÒÔ´ËÀàÍÆ¡£<parameter>num_points</parameter> ÊǶ¥µãµÄ×ÜÊý¡£ - </para> - <para> - <example> - <title><function>imagefilledpolygon</function> Àý×Ó</title> - <programlisting role="php"> +<!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> +<refentry id="function.imagefilledpolygon"> + <refnamediv> + <refname>imagefilledpolygon</refname> + <refpurpose>»Ò»¶à±ßÐβ¢Ìî³ä</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>imagefilledpolygon</methodname> + <methodparam><type>resource</type><parameter>image</parameter></methodparam> + <methodparam><type>array</type><parameter>points</parameter></methodparam> + <methodparam><type>int</type><parameter>num_points</parameter></methodparam> + <methodparam><type>int</type><parameter>color</parameter></methodparam> + </methodsynopsis> + <para> + <function>imagefilledpolygon</function> ÔÚ <parameter>image</parameter> + ͼÏñÖлһ¸öÌî³äÁ˵Ķà±ßÐΡ£ + </para> + <para> + <parameter>points</parameter> ²ÎÊýÊÇÒ»¸ö°´Ë³Ðò°üº¬Óжà±ßÐθ÷¶¥µãµÄ + <literal>x</literal> ºÍ <literal>y</literal> + ×ø±êµÄÊý×é¡£ + </para> + <para> + <parameter>num_points</parameter> ²ÎÊýÊǶ¥µãµÄ×ÜÊý£¬±ØÐë´óÓÚ 3¡£ + </para> + <para> + <example> + <title><function>imagefilledpolygon</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php - -// this example is provided by ecofarm at mullum dot com dot au - -// set up array of points for polygon +// ½¨Á¢¶à±ßÐθ÷¶¥µã×ø±êµÄÊý×é $values = array( - 0 => 40, // x1 - 1 => 50, // y1 - 2 => 20, // x2 - 3 => 240, // y2 - 4 => 60, // x3 - 5 => 60, // y3 - 6 => 240, // x4 - 7 => 20, // y4 - 8 => 50, // x5 - 9 => 40, // y5 - 10 => 10, // x6 - 11 => 10, // y6 -); - -// create image -$im = imagecreate(250, 250); + 40, 50, // Point 1 (x, y) + 20, 240, // Point 2 (x, y) + 60, 60, // Point 3 (x, y) + 240, 20, // Point 4 (x, y) + 50, 40, // Point 5 (x, y) + 10, 10 // Point 6 (x, y) + ); + +// ´´½¨Í¼Ïñ +$image = imagecreatetruecolor(250, 250); + +// É趨ÑÕÉ« +$bg = imagecolorallocate($image, 200, 200, 200); +$blue = imagecolorallocate($image, 0, 0, 255); -// some colors -$bg = imagecolorallocate($im, 255, 255, 255); -$blue = imagecolorallocate($im, 0, 0, 255); +// »Ò»¸ö¶à±ßÐÎ +imagefilledpolygon($image, $values, 6, $blue); -// draw a polygon -imagefilledpolygon($im, $values, 6, $blue ); - -// flush image +// Êä³öͼÏñ header('Content-type: image/png'); -imagepng($im); -imagedestroy($im); - +imagepng($image); +imagedestroy($image); ?> ]]> - </programlisting> - </example> - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: