php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29232 imagefilltoborder not filling downwards
Submitted: 2004-07-17 22:10 UTC Modified: 2004-07-24 13:20 UTC
From: jeroen dot clarysse at easynet dot be Assigned:
Status: Closed Package: GD related
PHP Version: 4.3.8 OS: MacOS 10.3.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jeroen dot clarysse at easynet dot be
New email:
PHP Version: OS:

 

 [2004-07-17 22:10 UTC] jeroen dot clarysse at easynet dot be
Description:
------------
the imagefilltoborder call will flood fill upwards only. 
it's pretty easy to see : http://
ldab.arts.kuleuven.ac.be/gdtest.php

I ran it on 3 other macs, clean installs with the PHP 
module from www.entropy.ch, which has very good fame 
among OSX people.

the weird part is that linux code works fine... 

I downloaded sources from 4.3.6 up to 4.3.9, and 
compared the gdImageFillToBorder calls. They are 
identical (even the original GD from Boutell has the 
same code) so I really don't know what could be wrong.

cheers

Reproduce code:
---------------
header("Content-type: image/png");
// create a blank image
$image = imagecreate(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);

// draw the ellipse
imageellipse($image, 200, 150, 300, 200, $col_ellipse);
imagefilltoborder($image, 200, 150, $col_ellipse,$col_ellipse);

// output the picture
header("Content-type: image/png");
imagejpeg($image);

Expected result:
----------------
a fully white ellipse on a black square

Actual result:
--------------
on a black square, an ellipse with white border, upper 
half filled white

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-24 12:17 UTC] jeroen dot clarysse at easynet dot be
okay. It works now. Thanks. The problem must be in the 
compiled entropy installer.
 [2004-07-24 13:20 UTC] pajoye@php.net
status => closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 12 00:01:27 2024 UTC