Process stops out of nowhere
arshavinel opened this issue · 2 comments
arshavinel commented
This code below usually works fine.
But uploading a file having 4,06MB and large of 8334x8334 makes $resizer->process()
stopping out of nowhere with no response.
ini_set("memory_limit", "256M");
$resizer = new Upload($data['tmp_name']);
$resizer->file_max_size = '5242880'; // 5MB
$resizer->file_new_name_body = File::name($data['name']);
$resizer->file_overwrite = true;
$resizer->file_name_body_lowercase = true;
$resizer->png_compression = 9; // (slow but smaller files)
$resizer->webp_quality = 100;
$resizer->jpeg_quality = 100;
$resizer->file_safe_name = true;
$resizer->image_resize = true;
$resizer->image_x = 720; // width
$resizer->image_y = 550; // height
$resizer->image_ratio_crop = true;
$resizer->process($destination); // stops here
// doesn't get here
if (!$resizer->processed) {
throw new \ErrorException($resizer->error);
}
What should I do?
verot commented
Increase your memory limit, you need more than 560M for your image .
Your image is very large : 8334x8334 = 69455556 so about 70Mpixels
70M x 8bits = 560Mbytes
arshavinel commented
It worked. Thanks.