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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alebec at sita dot fr
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 22:01:36 2025 UTC