[php-maint] Bug#426131: bug in php5-gd (or libgd2-xpm?): imagerectangle() draws thin rectangles non-properly

Alexey Bashtanov bashtanov at imap.cc
Sat May 26 14:53:55 UTC 2007


Package:php5-gd
Version:5.2.0-8+etch1

My OS is 2.6.18.4.686 (2.6.18.dsfg.1-12)
libgd2-xpm is 2.0.34~rc1-2
libc6 is 2.3.6.ds1-13
libc6-i686 is 2.3.6.ds1-13

I write:
	$img1=imagecreate(100,100);
	$white=imagecolorallocate($img1,255,255,255);
	imagecolortransparent($img1, $white);
	$red=imagecolorallocate($img1,255,0,0);
	imagerectangle($img1,0,$w-1,0,$h-1,$white);

	/* Here we call it */
	imagerectangle($img1,5,5,5,5,$red);

	imagepng($img1, "1.png");
	imagedestroy($img1);
I expect:
	a red 1x1 dot at (5,5),
	or at least an x-y-symmetric figure
I get:
	a 1x3 red line

another example

I write:
	imagerectangle($img1,5,5,10,5,$red);
I expect:
	a 6x1 line
I get such a figure:
	x    x
	xxxxxx
	x    x
-- 
  ljoha
  bashtanov at imap.cc

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again





More information about the pkg-php-maint mailing list