Ho un problema con imagecreatefromjpeg, dato questo codice:

codice:
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($jpgFile);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);

// Output
imagejpeg($image_p, $jpgNewFile, 60);
In alcuni casi (immagine di 700k il sistema mi dice:

Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 4768 bytes) in /web/htdocs/www.viadiqua.it/home/funzioni.php on line 92

A cui corrisponde proprio la funzione imagecreatefromjpeg

Mi sembra che succeda con immagini più grandi di un tot (tipo 1000x1000).
C'é un sistema per rimediare???

Grazie!