class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Unfortunately i can't change the memory, i use a shared webspace.
After trying for hours, I am not sure it is a file size problem. I reduced one image to 600Kb but left the dimensions to 2272px wide......it gave same problem.
I am trying to upload images and yes using your script to first resize width to:
$handle->image_x = 1000;
and then creating thumb:
$handle->image_x = 200;
I echoed a statemement that proved it uploaded to the tmp folder but wouldn't echo this:
if ($handle->processed) {
echo" everything was fine !";
Is there anything you can think of? or a way around it? Would be very grateful.
It is actually a file size issue. It is also a file dimension issue.
The dimensions that you want (2272px wide) are too big for the memory you have available. What happens is that the class (GD actually) converts the image into a bitmap before resizing it, or compressing it. A bitmap will require a lot more room than the JPEG version of the same image.
So if you have a file with a great dimensions (a lot of pixels), and even though the file size is small (in KB), the class will require a lot of memory to process your image.
There is no way around but reduce the dimensions of your picture, or increase the memory limit on your host.Reply
Unfortunately i can't change the memory, i use a shared webspace.
After trying for hours, I am not sure it is a file size problem. I reduced one image to 600Kb but left the dimensions to 2272px wide......it gave same problem.
I am trying to upload images and yes using your script to first resize width to:
and then creating thumb:
I echoed a statemement that proved it uploaded to the tmp folder but wouldn't echo this:
Is there anything you can think of? or a way around it? Would be very grateful.
Kind regards
Jon
The dimensions that you want (2272px wide) are too big for the memory you have available. What happens is that the class (GD actually) converts the image into a bitmap before resizing it, or compressing it. A bitmap will require a lot more room than the JPEG version of the same image.
So if you have a file with a great dimensions (a lot of pixels), and even though the file size is small (in KB), the class will require a lot of memory to process your image.
There is no way around but reduce the dimensions of your picture, or increase the memory limit on your host.