php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30483 imagefill() not working on images larger than 181x181
Submitted: 2004-10-19 18:11 UTC Modified: 2004-11-28 00:27 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: bjoneson at mchsi dot com Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 5.0.2 OS: Fedora Core 2
Private report: No CVE-ID: None
 [2004-10-19 18:11 UTC] bjoneson at mchsi dot com
Description:
------------
When I utilize imagecreatetruecolor to create an image larger than 181x181 pixels, the imagefill() has no effect (I'm left with an all black image). Anything smaller than 182x182 and it works just fine.



Reproduce code:
---------------
$img_big = imagecreatetruecolor(182, 182);
$brown=imagecolorallocate($img_big, 0xFF, 0xEF, 0xD8);
imagefill($img_big, 0, 0, $brown);
imagepng($img_big, "/usr/local/apache2/htdocs/cart/images/999999-1-big.png");

Expected result:
----------------
I would expect to see a 182x182 png filled with a tanish color (#FFEFD8) located in the file 999999-1-big.png


Actual result:
--------------
I get a 182x182 png filled with black.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-19 18:37 UTC] derick@php.net
What is your configure line?
 [2004-10-19 20:23 UTC] bjoneson at mchsi dot com
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-curl --with-gd --with-zlib-dir=/usr/include --with-jpeg-dir=/usr/lib
 [2004-10-19 21:39 UTC] bjoneson at mchsi dot com
Things are only getting weirder... I downloaded, compiled, and installed the newest version of gd. I then recompiled php using the same config line (didn't point --with-gd at anything). Now imagefill() seems to work at 182x182 and below but not above. (I gained one pixel). I'm perplexed.
 [2004-10-19 23:09 UTC] bjoneson at mchsi dot com
OK... though it was no short order, I re-compiled php and pointed --with-gd at the new installation using the following config:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-curl --with-gd=/usr/local  --with-zlib-dir=/usr/include --with-freetype-dir=/usr/local

When I do this, the problem goes away. This leads me to believe that the problem is most likely with the bundled version of gd in php5. 

If there is any other information I can provide, please let me know.
 [2004-10-23 10:36 UTC] tony2001@php.net
What's your version of libpng ?
Reproduce code works fine for me with any images.
 [2004-10-25 17:36 UTC] bjoneson at mchsi dot com
It's the stock RPM that comes with the Fedora 2 distribution "libpng-devel-1.2.2-22.i386.rpm"
 [2004-11-19 11:23 UTC] pajoye@php.net
Be sure that php uses the bundled library. If you have  gd and gd-devel packages installes (rpms or sources installed), you may have conflicts or wrong gd used.

Remove or move gd files out of the include and lib path and then start again the php configuration and compilation (after a make clean).

In fact the "official" imagefill is more buggy than the bundled one :)

--Pierre
 [2004-11-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2004-11-28 00:23 UTC] myguyroin at hotmail dot com
This is happening on PHP 4.3.9 too! I tried the compile method above, and it didn't fix my problem.
 [2004-11-28 00:27 UTC] pajoye@php.net
Do not use external gd ("--with-gd" not "--with-gd=/usr"

Set it as bogus, obvioulsy wrong lib/broken install.

--Pierre
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 21:01:27 2024 UTC