I'm uploading images via stream_copy_to_stream() and then re-sizing them using the class and method below.
This is my resize class: http://pastebin.com/wtbcbfzv
I'm using it like so.
$resizeObj = new resize('image.jpg');
$resizeObj -> resizeImage(960, 800, 'auto');
$resizeObj -> saveImage('image.jpg', 100);
However it sometimes works and sometimes doesn't, it just fails, no errors returned at all. I have the memory limit successfully set at 150M and have gone up to 300M with no such luck. I've also made sure that max_execution_time is set to 0 so there's no worries there.
Any suggestions on what could be causing this intermittent issue?
UPDATE This is being returned with the only image with the issue and I noticed the height is 6600 and when reduced to i.e. 5500 it works..
"imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions"