#27636 [Opn->Fbk]: imagecreatefromjpeg fails if the picture is too high
| From: | pajoye@php.net | Date: | Thu, 18 Mar 2004 18:29:18 +0000 |
| Subject: | #27636 [Opn->Fbk]: imagecreatefromjpeg fails if the picture is too high | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56635@lists.php.net to get a copy of this message | ||
ID: 27636
Updated by: pajoye@php.net
Reported By: mito at nic dot fi
-Status: Open
+Status: Feedback
Bug Type: GD related
Operating System: FreeBSD 4.8-RELEASE #0
PHP Version: 4.3.4
New Comment:
Hello,
both work perfectly here. Either using cli, or apache, php5 or php4.
Please add the memory_limit option to your php.ini. Default is 8M, try
more.
pierre
Previous Comments:
------------------------------------------------------------------------
[2004-03-18 13:25:56] mito at nic dot fi
Image that works:
Dimensions: 1600x1200
Size on disk: 575KB
Image that doesn't work:
Dimensions: 1200x1600
Size on disk: 491KB
------------------------------------------------------------------------
[2004-03-18 13:18:21] mito at nic dot fi
That is not the case. The test pic I provided that the code works with
is larger than the pic that causes the failure. Therefor if it were up
to the picture being too large and using too much memory it would occur
with the larger picture too wouldn't it?
------------------------------------------------------------------------
[2004-03-18 12:29:37] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You probably have a memory_limit enabled and it is reached
trying to allocate memory to store a big image.
------------------------------------------------------------------------
[2004-03-18 12:18:02] mito at nic dot fi
Description:
------------
When calling imagecreatefromjpeg("image.jpg"); where image.jpg is
1200x1600 pixels of size it causes an internal server error with no
actual error output just a plank page. I'm not sure if it's because the
picture is too high or does it occur every time if the height is larger
than width. I tested with many similar jpgs that were produced in same
way ( same digicam ), but were 1600x1200 and it worked fine. I also
tested the same code in 4.3.2 running on Windows and it worked fine
with both sizes of picture.
Reproduce code:
---------------
<?php
$im = imagecreatefromjpeg("badsanta.jpg");
print "Done!";
?>
See it at: http://mindanao.globat.com/~hopea.net/errortest/
Expected result:
----------------
Done!
Actual result:
--------------
500 Internal system error and a blank page (in IE).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27636&edit=1