Reply to I need help about resizing images

I need help about resizing images new!
by Osman, 11 years, 11 months ago
Hello,
When I run phpinfo(), I see the upload_max_filesize and post_max_size is 20M. When I put a customized php.ini in root and change the parameteres

upload_max_filesize = 1M
post_max_size = 1M

it makes no difference. When run phpinfo() after this, I still see 20M.

What should I do to change every uploaded images that greater than 1M exactly to 1Mb? I tried changing some parameters like $handle->image_max_width, $handle->image_max_height, $handle->image_max_pixels but I could only decrease the size a little (for example 5 M file to 2 MB).

Another way I tried is that in class.upload.php I changed the line
$this->file_max_size = $val; to $this->file_max_size = 1048576;

It only uploads images that equals or smaller than 1 MB. If the image is greater than 1 MB, upload process doesn't work normally. I can use the script like this but I will always have to resize the images manually before upload.

Thank you for your help.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important