|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12349 Broken PNG image
Submitted: 2001-07-24 14:33 UTC Modified: 2001-08-06 08:34 UTC
From: design at barma dot lviv dot ua Assigned:
Status: Closed Package: GD related
PHP Version: 4.0.6 OS: Windows 98
Private report: No CVE-ID: None
 [2001-07-24 14:33 UTC] design at barma dot lviv dot ua
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;
    $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);

and i have broken fullcolored rectangle

BUT - with php 4.0.5 work all best


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-24 17:39 UTC]
does this happen with jpgs or gifs (if you have support for
 [2001-07-24 21:43 UTC] design at barma dot lviv dot ua
No, only with PNG, with JPG format working fine,
and i dont install GIF support, only standart installation of PHP 4.0.6

And - i copy php_gd.dll from PHP 4.0.5 in to PHP 4.0.6 directory - CopyResized working, but some GD function not working - PHP crashed.

PS Sorry for bad english, im living in Ukraine and dont have big language practic
 [2001-07-24 21:45 UTC]
Which version of GD do you have?
 [2001-07-25 03:47 UTC] design at barma dot lviv dot ua
I use standart version of PHP, downloaded from

i think in PHP 4.0.5 and 4.0.6 used GD 1.8.4
but in PHP 4.0.6 ChangeLog file i see some GD 2.0.1 function
 [2001-08-06 08:34 UTC]
This is a bug in the GD-2.0.1 (beta) library.


PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 16:01:32 2024 UTC