timlondon Posted February 26, 2008 Share Posted February 26, 2008 I'm having problems using GD to resize large images (2mb +). Is GD the best way forward for this or should i be using something like Imagemagick? Link to comment https://forums.phpfreaks.com/topic/93128-image-resizing/ Share on other sites More sharing options...
Xeoncross Posted February 26, 2008 Share Posted February 26, 2008 As far as I know GD should be fine with that - however PHP it's self might be the cause of your problems. PHP is only allowed so much RAM per page request. You might need up to 6MB to process a 2MB image, and yet your PHP memory_limit could be set to only 4MB. http://us.php.net/manual/en/ini.core.php#ini.memory-limit Link to comment https://forums.phpfreaks.com/topic/93128-image-resizing/#findComment-477150 Share on other sites More sharing options...
timlondon Posted February 26, 2008 Author Share Posted February 26, 2008 do you mean the ini files resource limits? They are set to: max_execution_tim = 30 max_input_time = 60 memory_limit = 32M Link to comment https://forums.phpfreaks.com/topic/93128-image-resizing/#findComment-477169 Share on other sites More sharing options...
timlondon Posted February 27, 2008 Author Share Posted February 27, 2008 I've increased the memory_limit to 128 but the problems still there. I think i've isolated the problem to a copy failure. $newname="../../mbr/".$fl."/".$detail[0]."/Imagetmp/".$image_name; $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo 'Copy failed!'; exit; } The above works fine when uploading images under 2mb. But any image over 2mb gets a coy failure. Link to comment https://forums.phpfreaks.com/topic/93128-image-resizing/#findComment-478289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.