#43204 [Opn->Bgs]: imageRectangle not draw rectangle with 1x1 pixel size (i.e. square)

From: Date: Tue, 13 Nov 2007 09:39:11 +0000
Subject: #43204 [Opn->Bgs]: imageRectangle not draw rectangle with 1x1 pixel size (i.e. square)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119584@lists.php.net to get a copy of this message
ID: 43204 Updated by: pajoye@php.net Reported By: andreythinking at gmail dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Linux Mandrake 10.0 Official PHP Version: 5.2.4 Assigned To: pajoye New Comment: Already fixed. Previous Comments: ------------------------------------------------------------------------ [2007-11-13 08:35:53] andreythinking at gmail dot com I believe you orally. New version is not needed by me (to download it only to see bug correction). ------------------------------------------------------------------------ [2007-11-12 11:58:21] andreythinking at gmail dot com Commented lines in code listing aren't signifys. ------------------------------------------------------------------------ [2007-11-12 11:55:16] andreythinking at gmail dot com :-) I check this example on identical to firts message script. Simply, I type this example "by hands. The right code: <?php $k=imageCreate(20,30); $bgcolor=imageColorAllocate($k,255,0,255); $fgcolor=imageColorAllocate($k,0,255,255); imageFill($k,0,0,$bgcolor); imageRectangle($k,1,1,1,1,$fgcolor); #imageFilledRectangle($k,1,0,1,1,$fgcolor); #imageFilledRectangle($k,2,0,2,2,$fgcolor); #imageFilledRectangle($k,3,0,3,3,$fgcolor); #imageFilledRectangle($k,4,0,4,4,$fgcolor); #imageFilledRectangle($k,5,0,5,5,$fgcolor); header("content-type:image/png"); imagePNG($k); imageColorDeallocate($k,$fgcolor); imageColorDeallocate($k,$bgcolor); imageDestroy($k); ?> Thanks, after 12:00pm, when traffic will be half-cheaper, I try new version of PHP. ------------------------------------------------------------------------ [2007-11-12 11:47:36] pajoye@php.net Please try using the _latest_ php 5.2 release or using a snapshot. I can't reproduce your problem. By the way, in your latest example, you use $color and not $fgcolor, it is certainly why you don't see the pixels, they are drawn using the background colors (index color 0). ------------------------------------------------------------------------ [2007-11-12 11:19:56] andreythinking at gmail dot com I _always_ use bundled in gd library. My configure line is: ./configure --prefix=/usr/local/php5 --with-apache=../apache_1.3.29 --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr/lib/python2.3/lib-dynload/ * * * Oh! I discover new variations of this bug. Try to draw 1x1 pixel rectangle with another coordinats: imageRectangle($img,1,1,1,1,$color); imageRectangle($img,5,5,5,5,$color); imageRectangle($img,10,10,10,10,$color); etc. The parallelepiped 3x1 pixels is burned. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/43204 -- Edit this bug report at http://bugs.php.net/?id=43204&edit=1

« previous php.bugs (#119584) next »