php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40593 imagecreatefrompng memory using
Submitted: 2007-02-22 16:05 UTC Modified: 2007-02-22 16:15 UTC
From: alebec at sita dot fr Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 5.2.1 OS: WIN2000
Private report: No CVE-ID: None
 [2007-02-22 16:05 UTC] alebec at sita dot fr
Description:
------------
Hello, i just update PHP from V4.4.? to V5.2.1 on W2000 iis .

I use GD2 to convert png image file, 
since PHP5, i need to set memory_limit=50M to load a png file with imagecreatefrompng .
With php4 there is no pb with memory_limit=20M 

My png file is http://www.fairtec.fr/bug.png

Any explication ?

Reproduce code:
---------------
<?PHP
// error :(
ini_set( "memory_limit", "20M" );
$image=imagecreatefrompng ("bug.png");
?>

<?PHP
// ok :)
ini_set( "memory_limit", "50M" );
$image=imagecreatefrompng ("bug.png");
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-22 16:15 UTC] tony2001@php.net
GD library converts all images into the internal format.
Yes, this format is quite memory consuming. 
But that's something not PHP related.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC