note 47917 added to function.imagecreatetruecolor
| From: | termian at osu1 dot php dot net | Date: | Sun, 05 Dec 2004 12:59:08 +0000 |
| Subject: | note 47917 added to function.imagecreatetruecolor | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-81391@lists.php.net to get a copy of this message | ||
kai wrote:
//using imagecolorallocate to specify the image's background
//color does not work with truecolor-image.
//
//instead you have to use imagefill to force flood-filling the
//image with the backgorund-color previously allocated:
//
//$bgColor = imagecolorallocate($img, 255,255,255);
//imagefill($img , 0,0 , $bgColor);
even this doesn't work for my configuration - fedora core2, php 4.3.8 + gd bundled (2.0.23
compatible) and I have to do this:
$img = imagecreatetruecolor($x, $y);
$bgColor = imagecolorallocate($img, 255,255,255);
imagefilledrectangle($img, 0, 0, $x-1, $y-1, $bgColor);
----
Manual Page -- http://www.php.net/manual/en/function.imagecreatetruecolor.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47917
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47917&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47917&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47917&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47917&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47917&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47917&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47917&report=yes
Search -- http://master.php.net/manage/user-notes.php