Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #41057 : imagepng creates incorrect sized png
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 17th July 13:10
php-bugs
External User
 
Posts: 1
Default #41057 : imagepng creates incorrect sized png



From: rempargo at gmail dot com
Operating system: Windows XP Home
PHP version: 5.2.1
PHP Bug Type: GD related
Bug description: imagepng creates incorrect sized png

Description:
------------
imagepng creates incorrect sized png file if imagecreatetruecolor
parameters are smaller then 26.

e.g. 25 x 25 becomes 31 x 31.

The problems only occurs with imagepng, not with imagejpg nor with
imagegif.

Reproduce code:
---------------
<?php
header ("Content-type: image/png");


$im = @imagecreatetruecolor(25, 25)
or die("Cannot Initialize new GD image stream");

imagepng($im,null,0);

imagepng($im,'test.png',0);
imagejpeg($im,'test.jpg',100);
imagegif($im,'test.gif');
imagegd2($im,'test.raw');


imagedestroy($im);
?>

--
Edit bug report at http://bugs.php.net/?id=41057&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41057&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41057&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41057&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41057&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41057&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41057&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41057&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41057&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41057&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41057&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41057&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41057&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41057&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41057&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41057&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41057&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41057&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41057&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41057&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41057&r=mysqlcfg
  Reply With Quote


  sponsored links


2 17th July 13:10
External User
 
Posts: 1
Default #41057 : imagepng creates incorrect sized png



ID: 41057
Updated by: tony2001@php.net
Reported By: rempargo at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: GD related
Operating System: Windows XP Home
PHP Version: 5.2.1
New Comment:

Please put the result image somewhere, so we can take a look at it.


Previous Comments:
------------------------------------------------------------------------

[2007-04-11 19:37:12] rempargo at gmail dot com

Description:
------------
imagepng creates incorrect sized png file if imagecreatetruecolor
parameters are smaller then 26.

e.g. 25 x 25 becomes 31 x 31.

The problems only occurs with imagepng, not with imagejpg nor with
imagegif.

Reproduce code:
---------------
<?php
header ("Content-type: image/png");


$im = @imagecreatetruecolor(25, 25)
or die("Cannot Initialize new GD image stream");

imagepng($im,null,0);

imagepng($im,'test.png',0);
imagejpeg($im,'test.jpg',100);
imagegif($im,'test.gif');
imagegd2($im,'test.raw');


imagedestroy($im);
?>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=41057&edit=1
  Reply With Quote
3 17th July 13:10
External User
 
Posts: 1
Default #41057 : imagepng creates incorrect sized png


ID: 41057
Updated by: tony2001@php.net
Reported By: rempargo at gmail dot com
Status: Feedback
Bug Type: GD related
Operating System: Windows XP Home
PHP Version: 5.2.1
New Comment:

Cannot reproduce anything like that.
Check your image viewer.


Previous Comments:
------------------------------------------------------------------------

[2007-04-11 19:50:14] tony2001@php.net

Please put the result image somewhere, so we can take a look at it.

------------------------------------------------------------------------

[2007-04-11 19:37:12] rempargo at gmail dot com

Description:
------------
imagepng creates incorrect sized png file if imagecreatetruecolor
parameters are smaller then 26.

e.g. 25 x 25 becomes 31 x 31.

The problems only occurs with imagepng, not with imagejpg nor with
imagegif.

Reproduce code:
---------------
<?php
header ("Content-type: image/png");


$im = @imagecreatetruecolor(25, 25)
or die("Cannot Initialize new GD image stream");

imagepng($im,null,0);

imagepng($im,'test.png',0);
imagejpeg($im,'test.jpg',100);
imagegif($im,'test.gif');
imagegd2($im,'test.raw');


imagedestroy($im);
?>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=41057&edit=1
  Reply With Quote
4 17th July 16:14
php-bugs
External User
 
Posts: 1
Default #41057 : imagepng creates incorrect sized png


ID: 41057
User updated by: rempargo at gmail dot com
Reported By: rempargo at gmail dot com
-Status: Feedback
+Status: Closed
Bug Type: GD related
Operating System: Windows XP Home
PHP Version: 5.2.1
New Comment:

It was indeed my viewer (VuePrint 8.0), it gave the wrong size.
I was misled, because .gif and .jpg were correct in this viewer.


Previous Comments:
------------------------------------------------------------------------

[2007-04-11 19:53:56] tony2001@php.net

Cannot reproduce anything like that.
Check your image viewer.

------------------------------------------------------------------------

[2007-04-11 19:50:14] tony2001@php.net

Please put the result image somewhere, so we can take a look at it.

------------------------------------------------------------------------

[2007-04-11 19:37:12] rempargo at gmail dot com

Description:
------------
imagepng creates incorrect sized png file if imagecreatetruecolor
parameters are smaller then 26.

e.g. 25 x 25 becomes 31 x 31.

The problems only occurs with imagepng, not with imagejpg nor with
imagegif.

Reproduce code:
---------------
<?php
header ("Content-type: image/png");


$im = @imagecreatetruecolor(25, 25)
or die("Cannot Initialize new GD image stream");

imagepng($im,null,0);

imagepng($im,'test.png',0);
imagejpeg($im,'test.jpg',100);
imagegif($im,'test.gif');
imagegd2($im,'test.raw');


imagedestroy($im);
?>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=41057&edit=1
  Reply With Quote
5 17th July 16:14
External User
 
Posts: 1
Default #41057 : imagepng creates incorrect sized png


ID: 41057
Updated by: tony2001@php.net
Reported By: rempargo at gmail dot com
-Status: Closed
+Status: Bogus
Bug Type: GD related
Operating System: Windows XP Home
PHP Version: 5.2.1


Previous Comments:
------------------------------------------------------------------------

[2007-04-12 17:11:01] rempargo at gmail dot com

It was indeed my viewer (VuePrint 8.0), it gave the wrong size.
I was misled, because .gif and .jpg were correct in this viewer.

------------------------------------------------------------------------

[2007-04-11 19:53:56] tony2001@php.net

Cannot reproduce anything like that.
Check your image viewer.

------------------------------------------------------------------------

[2007-04-11 19:50:14] tony2001@php.net

Please put the result image somewhere, so we can take a look at it.

------------------------------------------------------------------------

[2007-04-11 19:37:12] rempargo at gmail dot com

Description:
------------
imagepng creates incorrect sized png file if imagecreatetruecolor
parameters are smaller then 26.

e.g. 25 x 25 becomes 31 x 31.

The problems only occurs with imagepng, not with imagejpg nor with
imagegif.

Reproduce code:
---------------
<?php
header ("Content-type: image/png");


$im = @imagecreatetruecolor(25, 25)
or die("Cannot Initialize new GD image stream");

imagepng($im,null,0);

imagepng($im,'test.png',0);
imagejpeg($im,'test.jpg',100);
imagegif($im,'test.gif');
imagegd2($im,'test.raw');


imagedestroy($im);
?>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=41057&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666