PHP Help
Dear lazy web:
How do I make PHP not run out of memory when doing thumbnails of large images? I’ve got this code:
$href = $path . "/" . $file; $tn_file = "thumbnail-" . $file; $orig_file = $full_path . "/" . $file; /* generate thumbnail if it does not exist */ if (file_exists ($tn_file) == false) { $im = @imagecreatefromjpeg ($orig_file); if (!$im) { $im = @imagecreatefrompng ($orig_file); if (!$im) continue; $is_png = 1; } else $is_png = 0; if (imagesx ($im)It works great for most of my images (as you can see here), but it doesn't for big images (2592x1944 pixels, like this one).
I've been trying all the solutions mentioned in this page, but none seems to work for me I am assuming it's an out-of-memory problem, but could it be something else?