10-22-2009, 05:58 AM
|
#1 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
|
GD Exceeding Memory Size... What?
Fatal error:Allowed memory size of 16777216 bytes exhausted (tried to allocate 2816 bytes) in W:\htdocs\xxx\index.php on line 62
PHP Code:
function createThumbs($rawImage, $imgDir){ chdir($imgDir); $thumbDir = '/thumbs/'; if (!file_exists($thumbDir)){ mkdir($thumbDir); } $filename = $rawImage; $thumbHeight = 300; header('(anti-spam-(anti-spam-content-type:)) image/jpeg'); // Get new sizes list($width, $height) = getimagesize($filename); $ratio = ($height/$width); $newHeight = $thumbHeight; $newWidth = ($thumbHeight/$ratio); // Load $thumb = imagecreatetruecolor($newWidth, $newHeight); $source = imagecreatefromjpeg($filename); // Line 62 // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height); // Output imagejpg($thumb, $thumbDir, 100); }
So... How do I resolve this problem?
__________________
Signatures are nothing but incriminating.
|
|
|