|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-16 19:27 UTC] colder@php.net
[2020-02-07 06:11 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 20:00:02 2025 UTC |
Description: ------------ In a related bug to #36447, imagecolorallocate has this example: <?php $im = imagecreate('example.jpg', 100, 100); // sets background to red $background = imagecolorallocate($im, 255, 0, 0); // sets some colors $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); // hexadecimal way $white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF); $black = imagecolorallocate($im, 0x00, 0x00, 0x00); ?> However, imagecreate has this syntax: resource imagecreate ( int x_size, int y_size ) Ergo the first call in the example will issue an error. Suggested fix is as simple as ever: $im = imagecreate(100, 100); NeoThermic