1

I am using a php function to resize the images. Here is the link to the function I am using.

http://mediumexposure.com/smart-image-resizing-while-preserving-transparency-php-and-gd-library/

It works alright for the low resolution images, but I face problem while uploading high resolution image. When I try uploading a JPEG/image with a resolution or 4320 × 3240 it does not resize....instead it just skips resizing and moves the file to the destination.

I would like to know if the function is capable of resizing the image with higher resolution. If yes then what is possibly wrong?

This is the code I am using to resize:

include('smart_resize_image.function.php');
ini_set ( "memory_limit", "100M");
 smart_resize_image($targetFile,
                              $width = 930,
                              $height = 640,
                              $proportional = false,
                              $output = 'file',
                              $delete_original = true,
                              $use_linux_commands = false );

I have also put on following code in htaccess:

php_value upload_max_filesize 100M
php_value post_max_size 100M

I don't mind increasing the memory_limit because only a single admin will be uploading a file at a time.

bpeterson76
  • 12,918
  • 5
  • 49
  • 82
Ibrahim Azhar Armar
  • 25,288
  • 35
  • 131
  • 207
  • You already tried this method, and does not really work-out as expected, mind to **seriously** consider to abandon this class/method ? – ajreal Dec 04 '10 at 15:49
  • @ajreal i tried many but nothing seems to work perfectly, i don't have imagemagick support in my server. is there any other alternativei would gladly adopt if it provides the solution. i am looking for a script that would resize to a fixed size it should resize the image with high resolution. i don't have more requirement then this. – Ibrahim Azhar Armar Dec 04 '10 at 15:56
  • what are the alternatives that you have tried ? mind to update your question again to illustrate? – ajreal Dec 04 '10 at 15:58
  • @ajreal the one i used before is http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php – Ibrahim Azhar Armar Dec 04 '10 at 16:05
  • so, you reluctant to try http://stackoverflow.com/questions/4277823/imagemagick-or-gd-libary-for-image-resizing-and-thumbnail-creation ? – ajreal Dec 04 '10 at 16:10
  • Here is a link for php resize try this http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php – Pradeep Singh Dec 04 '10 at 16:01
  • i used that script at first instance, that script refuse to resize the image with high resolution. have you tried yourself uploading high resolution image with that script? – Ibrahim Azhar Armar Dec 04 '10 at 16:04
  • I uses this script for creating thumbnail and its working – Pradeep Singh Dec 04 '10 at 16:10

0 Answers0