php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32042 small rectangles are broken
Submitted: 2005-02-21 10:40 UTC Modified: 2005-02-28 13:33 UTC
From: guth at fiifo dot u-psud dot fr Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5CVS-2005-02-21 (dev) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: guth at fiifo dot u-psud dot fr
New email:
PHP Version: OS:

 

 [2005-02-21 10:40 UTC] guth at fiifo dot u-psud dot fr
Description:
------------
imagerectangle() does not work with small rectangles.
With the same code, imagefilledrectangle() works.

See the result:
http://haricow.org/gd/rectangle.png

Reproduce code:
---------------
<?php
$image = imagecreatetruecolor(10, 10);

$white = imagecolorallocate($image, 255, 255, 255);

imagerectangle($image, 2, 4, 8, 4, $white);

imagecolordeallocate($image, $white);

header('Content-Type: image/png');
imagepng($image);
?>

Expected result:
----------------
A rectangle.

Actual result:
--------------
A strange shape.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-28 09:38 UTC] pajoye@php.net
Cannot reproduce here, please provide an url to the expected result and one with what you get now.

--Pierre
 [2005-02-28 10:59 UTC] guth at fiifo dot u-psud dot fr
Actual result : http://artichow.org/gd/actual.png
Expected result : http://artichow.org/gd/expected.png
 [2005-02-28 11:09 UTC] pajoye@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Even if you think it is not a bug, we often know better than you,
please consult the support channels first before even considering
to reopen this report.

Thank you for your interest in PHP.

Seems like you use an external GD.

Please try using the bundled gd (configure --with-gd, not with-gd=/path/to/ext/gd).

--Pierre
 [2005-02-28 11:16 UTC] guth at fiifo dot u-psud dot fr
Here is my ./configure line :

./configure --enable-debug --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-jpeg-dir --with-png-dir --with-gd --enable-gd-native-ttf --with-freetype-dir --with-zlib-dir --with-openssl --enable-sysvsem --enable-sysvshm --with-xsl --with-mysql --with-pgsql --enable-memory-limit

I use the bundled GD.
 [2005-02-28 11:40 UTC] pajoye@php.net
Are you sure you do not have any gd-devel package installed?

If yes, remove/move them before running configure and make.



--Pierre
 [2005-02-28 11:59 UTC] guth at fiifo dot u-psud dot fr
Recompiling PHP with:
make clean
./configure --with-apxs=/usr/local/apache/bin/apxs --with-jpeg-dir --with-png-dir --with-gd --enable-gd-native-ttf --with-freetype-dir --with-zlib-dir
make
make install

I removed all GD libraries:
[root@localhost php5-STABLE-200502101130]# rpm -qa | grep gd
libgdk-pixbuf2-0.22.0-5mdk
ifplugd-0.25-1mdk
sysklogd-1.4.1-6mdk
gdk-pixbuf-loaders-0.22.0-5mdk
gdb-6.2-2mdk
libgdk_pixbuf2.0_0-2.4.9-9mdk
libgdk-pixbuf-gnomecanvas1-0.22.0-5mdk
libgdbm2-1.8.0-25mdk


The problem is still here...
 [2005-02-28 12:14 UTC] pajoye@php.net
Please try using "Latest CVS (5.1.x-dev)" snapshot

--Pierre
 [2005-02-28 13:02 UTC] guth at fiifo dot u-psud dot fr
Works as expected with 5.1.x dev.


merci :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC