|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-23 10:24 UTC] svn@php.net
[2009-10-23 10:26 UTC] salathe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 11:00:02 2026 UTC |
Description: ------------ In the sample code on imagecolorat() the function imagecolorsforindex() is missing an argument, the image resource. See the man page for imagecolorsforindex: array imagecolorsforindex ( resource $image , int $index ) Reproduce code: --------------- <?php $im = imagecreatefrompng("php.png"); $rgb = imagecolorat($im, 10, 15); list($r, $g, $b, $alpha) = imagecolorsforindex($rgb); var_dump($r, $g, $b, $alpha); Expected result: ---------------- <?php $im = imagecreatefrompng("php.png"); $rgb = imagecolorat($im, 10, 15); list($r, $g, $b, $alpha) = imagecolorsforindex($im, $rgb); var_dump($r, $g, $b, $alpha);