cvs: phpdoc /en/reference/image/functions imagesetstyle.xml
| From: | Damien Seguy | Date: | Fri, 20 Dec 2002 03:34:54 +0000 |
| Subject: | cvs: phpdoc /en/reference/image/functions imagesetstyle.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969350343@lists.php.net to get a copy of this message | ||
dams Thu Dec 19 22:34:54 2002 EDT
Modified files:
/phpdoc/en/reference/image/functions imagesetstyle.xml
Log:
fixing error in the example
Index: phpdoc/en/reference/image/functions/imagesetstyle.xml
diff -u phpdoc/en/reference/image/functions/imagesetstyle.xml:1.3
phpdoc/en/reference/image/functions/imagesetstyle.xml:1.4
--- phpdoc/en/reference/image/functions/imagesetstyle.xml:1.3 Thu Apr 18 13:13:10 2002
+++ phpdoc/en/reference/image/functions/imagesetstyle.xml Thu Dec 19 22:34:54 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.43 -->
<refentry id="function.imagesetstyle">
<refnamediv>
@@ -27,9 +27,8 @@
<example>
<title>imagesetstyle</title>
<programlisting role="php">
-<![CDATA[
<?php
-header ("Content-type: image/png");
+header ("Content-type: image/jpeg");
$im = imagecreate (100, 100);
$w = imagecolorallocate ($im, 255, 255, 255);
$red = imagecolorallocate ($im, 255, 0, 0);
@@ -44,14 +43,15 @@
imagesetstyle ($im, $style);
$brush = imagecreatefrompng ("http://www.libpng.org/pub/png/images/smile.happy.png");
-imagecolortransparent ($brush, $w);
+$w2 = imagecolorallocate($brush,255,255,255);
+imagecolortransparent ($brush, $w2);
imagesetbrush ($im, $brush);
imageline ($im, 100, 0, 0, 100, IMG_COLOR_STYLEDBRUSHED);
-imagepng ($im);
+imagejpeg ($im);
imagedestroy ($im);
?>
-]]>
+
</programlisting>
</example>
</para>