Jump to content

Image help


Distant_storm

Recommended Posts

I have been having problems with my image stuff...

 

Ok heres what my system does...

 

Uploads image.. resizes and saves,gets rid of gd image stuff, addswatermark and saves, gets rid of unwanted gd image data, saves

 

However my upload is set to 2M. However I don't think this is the issue.

 

If I upload an image that is only 1.1 mb i get this error message.

 

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 2816 bytes) in /XXX/XXX/XXXX.php on line 89

 

Line 89 onward is ...

 

$file_allocation= ".." . $base_url_temp . "/" . $_FILES['photofile']['name'];

$file_allocation_new = ".." . $base_url_temp . "/1" . $_FILES['photofile']['name'] ;

switch ($file_type) {

case "jpg":
$src = imagecreatefromjpeg($file_allocation);
break;

case "gif":
$src = imagecreatefromGif($file_allocation);
break;

case "png":
$src = imagecreatefromPng($file_allocation);
break;
}

 

Would it help if i put parts of the script into a new script ?

 

Or do i need to do something else?

 

 

Link to comment
https://forums.phpfreaks.com/topic/81552-image-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.