Guest jeromas Posted August 25, 2005 Share Posted August 25, 2005 File Name :: Multi-thumbnail Creator Author :: jeromas Category :: Converters & Patches Description This mod allows you to create multiple thumbnails at one time from a directory of files. Though instructions are included in the comments at the top of the script, here they are again: (1) Upload this script to a directory containing your images. The directory must be mod 755 for this script to run correctly. Save the file with the extension '.php' instead of '.txt', so it will be parsed by your webserver as php. (2) If you want to change the values of the configuration variables below feel free. There is a short comment by each variable name (3) Navigate to the script URL in your browser, ie if this script is located in /images in your web directory,type http://www.mywebsite.com/images/thumbnail_creator.php (4) The script will then run, and you should see the thumbnails in addition to the old images you made them from (5) Feel free to modify, update, and make this script better. Just send me a copy at [email protected] when you do! Configuation Variables ************************************* * Feel free to change these as needed ************************************ # Constants define(MAX_WIDTH, 75); // Describes how wide your thumbnail will be in pixels define(MAX_HEIGHT, 75); // Describes how high your thumbnail will be in pixels # Variables $im_prefix = 'thumb_'; // The prefix that all thumbnail files will have, ie // the thumbnail of dog.jpg becomes thumb_dog.jpg $im_suffix = '.png'; // The suffix you will give to your image // This suffix must be for the same type of image // as thefunction you are calling View File Link to comment Share on other sites More sharing options...
Guest fgumpster Posted September 14, 2005 Share Posted September 14, 2005 I had to replace the call to "imagejpg()" about line 124 with "imagejpeg()" (with an 'e') With that little tweak the script was a life saver for me. Thanks jeromas! Link to comment Share on other sites More sharing options...
Guest Posted September 17, 2005 Share Posted September 17, 2005 awesome mod! Not using it for my cart though! Link to comment Share on other sites More sharing options...
Guest donna61 Posted October 20, 2005 Share Posted October 20, 2005 This Mod seems to be my last hope, but I am getting the following warning msgs: Warning: imagecreatetruecolor(): Invalid image dimensions in /home/virtual/site30/fst/var/www/html/images/thumbnail_creator.php on line 95 Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/virtual/site30/fst/var/www/html/images/thumbnail_creator.php on line 99 Fatal error: Maximum execution time of 60 seconds exceeded in /home/virtual/site30/fst/var/www/html/images/thumbnail_creator.php on line 99 I had changed the imagejpg to imagejpeg as suggest earlier as well. I also had a huge string of error msgs until I // out the .gif and the .png lines around line 120-122 Link to comment Share on other sites More sharing options...
Recommended Posts