#45511 [NEW]: Mistake With Example On imageelipse() Function Page
| From: | danbrown@php.net | Date: | Mon, 14 Jul 2008 15:16:14 +0000 |
| Subject: | #45511 [NEW]: Mistake With Example On imageelipse() Function Page | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-948@lists.php.net to get a copy of this message | ||
From: danbrown@php.net
Operating system: N/A
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Mistake With Example On imageelipse() Function Page
Description:
------------
As reported by user note #84416, imageelipse() function example #1 defines
background, but doesn't use it anywhere. As a result, changing this color
will not change the background.
Reproduce code:
---------------
<?php
// create a blank image
$image = imagecreatetruecolor(400, 300);
// fill the background color
$bg = imagecolorallocate($image, 0, 0, 0);
// choose a color for the ellipse
$col_ellipse = imagecolorallocate($image, 255, 255, 255);
// Should include the following line, but doesn't.
// imagefill($image, 0, 0, $bg);
// draw the ellipse
imageellipse($image, 200, 150, 300, 200, $col_ellipse);
// output the picture
header("Content-type: image/png");
imagepng($image);
?>
--
Edit bug report at http://bugs.php.net/?id=45511&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45511&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45511&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45511&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45511&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45511&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45511&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45511&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45511&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45511&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45511&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45511&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45511&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45511&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45511&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45511&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45511&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45511&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45511&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45511&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45511&r=mysqlcfg