Bug #12349: Broken PNG image

From: Date: Tue, 24 Jul 2001 18:33:30 +0000
Subject: Bug #12349: Broken PNG image
Groups: php.dev 
Request: Send a blank email to php-dev+get-60891@lists.php.net to get a copy of this message
From:             design@barma.lviv.ua
Operating system: Windows 98
PHP version:      4.0.6
PHP Bug Type:     GD related
Bug description:  Broken PNG image

i have problem with create small copy of PNG transparent images:

Windows 98
apache 1.3.20
php 4.0.6

<?
Header("Content-type: image/png");
$s = GetImageSize($rimg);
if ($s[0]>$s[1])
    $z = $s[0]/60;
else
    $z = $s[1]/60;
$x = (int)($s[0]/$z);
$y = (int)($s[1]/$z);
$dst_img = ImageCreate($x,$y);
$src_img = ImageCreateFromPNG("../img/test.png");
$colT = ImageColorAllocate($dst_img,0,255,0);
ImageFill($dst_img,0,0,$colT);
ImageCopyResized($dst_img,$src_img,0,0,0,0,$x,$y,$s[0],$s[1]);
ImageColorTransparent($dst_img,$colT);
ImagePNG($dst_img);
ImageDestroy($src_img);
ImageDestroy($dst_img);
?>

and i have broken fullcolored rectangle

BUT - with php 4.0.5 work all best
-- 
Edit bug report at: http://bugs.php.net/?id=12349&edit=1



Thread (6 messages)

« previous php.dev (#60891) next »