svn: /phpdoc/en/trunk/reference/image/functions/ imagecolorat.xml
| From: | Peter Cowburn | Date: | Fri, 23 Oct 2009 10:24:48 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/image/functions/ imagecolorat.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5201@lists.php.net to get a copy of this message | ||
salathe Fri, 23 Oct 2009 10:24:48 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289884
Log:
Fixed broken example. Closes #49969
Bug: http://bugs.php.net/49969 (Open) imagecolorat sample
error
Changed paths:
U phpdoc/en/trunk/reference/image/functions/imagecolorat.xml
Modified: phpdoc/en/trunk/reference/image/functions/imagecolorat.xml
===================================================================
--- phpdoc/en/trunk/reference/image/functions/imagecolorat.xml 2009-10-23 09:22:40 UTC (rev 289883)
+++ phpdoc/en/trunk/reference/image/functions/imagecolorat.xml 2009-10-23 10:24:48 UTC (rev 289884)
@@ -89,19 +89,25 @@
$im = imagecreatefrompng("php.png");
$rgb = imagecolorat($im, 10, 15);
-list($r, $g, $b, $alpha) = imagecolorsforindex($rgb);
+$colors = imagecolorsforindex($im, $rgb);
-var_dump($r, $g, $b, $alpha);
+var_dump($colors);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
-int(119)
-int(123)
-int(180)
-int(127)
+array(4) {
+ ["red"]=>
+ int(119)
+ ["green"]=>
+ int(123)
+ ["blue"]=>
+ int(180)
+ ["alpha"]=>
+ int(127)
+}
]]>
</screen>
</example>