php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27995 imagefilltoborder fails to fill a polygon
Submitted: 2004-04-14 12:17 UTC Modified: 2004-04-14 18:39 UTC
From: agarcia at at4 dot net Assigned:
Status: Closed Package: GD related
PHP Version: 4.3.6RC3 OS: linux
Private report: No CVE-ID:
 [2004-04-14 12:17 UTC] agarcia at at4 dot net
Description:
------------
imagefilltoborder stops filling a polygon before reaching
all the borders.
The code provided works as expected with php 4.3.4. 
Not tested with 4.3.5


Reproduce code:
---------------
header("Content-type: image/png");
$id = @imagecreate(200, 200);

$background_color = imagecolorallocate($id, 0, 0, 0);
$color = imagecolorallocate($id, 255, 0, 0);
$contorno = imagecolorallocate($id, 0, 255, 0);

$puntos = array(135,22,138,22,138,29,158,29,158,49,136,49,136,41,132,41,132,33,135,33,135,22);

imagepolygon($id, &$puntos, floor(count($puntos)/2), $contorno);
imagefilltoborder($id, 145, 35, $contorno, $color);

ImagePng( $id );
ImageDestroy( $id );


Expected result:
----------------
A red filled green polygon

Actual result:
--------------
A partially red filled green polygon

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-14 18:39 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 19:01:51 2014 UTC