adding example, with image_destroy() and some WS

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@132604 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2003-06-20 13:00:52 +00:00
parent f0212d661c
commit d8a3146641
2 changed files with 37 additions and 8 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.36 -->
<refentry id="function.imagecreate">
<refnamediv>
@ -36,6 +36,7 @@ $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>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imagecreatetruecolor">
<refnamediv>
@ -18,14 +18,42 @@
representing a black image of size <parameter>x_size</parameter>
by <parameter>y_size</parameter>.
</para>
<note><para>This function was added in PHP 4.0.6 and requires GD 2.0.1 or later</para></note>
<note><para>This function will not work with GIF file formats.</para></note>
<para>
<example>
<title>
Creating a new GD image stream and outputting an image.
</title>
<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);
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
See also <function>imagedestroy</function> and
<function>imagecreate</function>.
This function was added in PHP 4.0.6 and requires GD 2.0.1 or later.
</para>
</refsect1>
</refentry>
</note>
<note>
<para>
This function will not work with GIF file formats.
</para>
</note>
<para>
See also <function>imagedestroy</function> and
<function>imagecreate</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables: