ID:               29398
 Updated by:       [EMAIL PROTECTED]
 Reported By:      speps84 at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Windows XP
 PHP Version:      5.0.0
 New Comment:

GD lib needs lots of memory to store the image converted to it's
internal format, which is very memory consumpting. 
So GD just don't have enough memory to do it.
Use console tools (ImageMagick for example) to work with such a large
files, this is not a PHP bug.



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

[2004-07-26 23:26:38] speps84 at hotmail dot com

Description:
------------
I wrote a script that uses GD to slice big jpeg files (about 50mb,
21600x21600) into small 100x100 jpeg.
To make this, I have to open these big files and I use the function
imagecreatefromjpeg.
While loading (HDD is working), I receive this error:

FATAL: emalloc(): Unable to allocate 86400 bytes

I have tested different values of memory_limit in php.ini ( and with
--enable-memory-limit) even the unlimited value of -1: always the same
error.

This error happens only with very big jpeg files (37mb and 47mb), not
with about 4mb jpeg.

Reproduce code:
---------------
Launching PHP in Command Line mode under Windows XP:

php "myscript.php" --enable-debug --enable-memory-limit

The PHP Code is very simple :

$img = imagecreatefromjpeg("bigfile.jpg");



Expected result:
----------------
Opening of the image.

Actual result:
--------------
FATAL: emalloc(): Unable to allocate 86400 bytes


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


-- 
Edit this bug report at http://bugs.php.net/?id=29398&edit=1

Reply via email to