Problem with image_resize

See all posts Reply

Problem with image_resize new!
by lance, 15 years, 1 month ago
When $handle->image_resize is set to true and $handle->process($upload_dir) is called, the class causes the script to exit - no errors are returned.

I'm using version 0.20 of the class and GD library version 2.0.28.

The script works perfectly when $handle->image_resize is set to false.

The file being processed is a jpg image with a file size of 227.25KB.

Any ideas on how to resolve this will be greatly appreciated.Reply
Re: Problem with image_resize new!
by colin, 15 years, 1 month ago
Does it work with a smaller image? It looks like a memory limit problem to me.

What PHP memory limit do you have on your server?Reply
Re: Problem with image_resize new!
by lance, 15 years, 1 month ago
Yes, it does work with smaller images.

The memory_limit is set to 8M (local value), 20M (master value).

Thanks for the reply.Reply
Re: Problem with image_resize new!
by colin, 15 years, 1 month ago
Then try to raise your local memory to 20M.

You can add this in your script:
ini_set ( "memory_limit", "20M")

Or in a .htaccess file:
php_value memory_limit 20M

When resizing an image, it first has to be transformed in a kind of bitmap, then you need some more memory to actually resize. If you then add the size of your script to that, you can reach 8MB very quickly.Reply