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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

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: Thu Apr 25 10:01:29 2024 UTC