DBookatay Posted February 16, 2008 Share Posted February 16, 2008 I know this question has been asked over and over again, hence the title... I am trying to find a script that will do 3 things: 1.) Resize the image to 365x274 and upload it to a specified directory 2.) Create a thumbnail of the same image at 90x45 and place it in a different directory 3.) Rename both images, based on $_GET ($stock= $_GET[stock] I've found scripts that will upload images (and even created one), or/and make a thumbnail, or/and rename images, but nothing that will do all 3. Plus most of the thumbnail create scripts seems to strip a lot of colors out of the images, making them not as attractive. Does anyone know a good place to look code examples, or have a good script in thier code library? Link to comment https://forums.phpfreaks.com/topic/91343-and-yet-still-another-question-about-image-resize-and-thumbnails/ Share on other sites More sharing options...
DBookatay Posted February 16, 2008 Author Share Posted February 16, 2008 Anyone? Link to comment https://forums.phpfreaks.com/topic/91343-and-yet-still-another-question-about-image-resize-and-thumbnails/#findComment-468156 Share on other sites More sharing options...
phpSensei Posted February 16, 2008 Share Posted February 16, 2008 You can just do /////////// THUMBNAIL <img src="image.png" height="90" width="90" /> /////////// IMG <img src="image.png" height="365" width="274" /> and for your other question bool rename ( string $oldname , string $newname [, resource $context ] ) http://ca.php.net/rename <?php $new_name = $_GET['stock']; rename("/tmp/tmp_file.txt", "/home/user/login/docs/".$new_name); ?> Link to comment https://forums.phpfreaks.com/topic/91343-and-yet-still-another-question-about-image-resize-and-thumbnails/#findComment-468158 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.