|
Posted by Andy Hassall on 07/14/05 01:50
On 13 Jul 2005 18:12:10 -0400, spark@cc.gatech.edu (steve park) wrote:
>We have a php-based setup that allows users to upload images and then some
>back-end stuff that stores the original image and creates a thumbnail image.
>I've just noticed that large images, say 1500x1500 or larger, give the
>resize script some problems. We're using Shiege Iseng's resize class
>(http://kentung.f2o.org/scripts/thumbnail/).
>
>The error is coming when the class calls the imagecreatefromjpeg() function,
>and the specific error is
>
> Fatal error: Allowed memory size of 29360128 bytes exhausted (tried to
>allocate 8652 bytes) in <servername>/resize.php on line 51
>
>The image itself is 2163x2957x24bpp at 300 dpi and is 3 megs on disk and
>18.31 MB in memory, according to IrfanView.
Can you simply raise the value of memory_limit?
It's there to stop runaway scripts eating memory, but in this case you know
you need that memory for a short time to do the processing.
>I'm wondering:
>
>1. will the problem go away if I upgrade to GD 2.x?
>2. will the problem go away if I upgrade to PHP 5?
Wouldn't have thought so - you're using the memory, and so memory_limit is
working as advertised.
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
[Back to original message]
|