pouncer Posted January 23, 2007 Share Posted January 23, 2007 I found these great thumbnail script[code=php:0]<?php // useage is thumbnail.php?im=imagename.jpg // set for 120 px thumb Header("Content-type: image/jpeg"); $orig_image = imagecreatefromjpeg($im); list($width, $height, $type, $attr) = getimagesize($im); if ($width > 120) { $ratio = 120 / $width; $newheight = $ratio * $height; } else $newheight = $height; $sm_image = imagecreatetruecolor(120,$newheight) or die ("Cannot Initialize new gd image stream");; Imagecopyresampled($sm_image,$orig_image,0,0,0,0,120,$newheight,imagesx($orig_image),imagesy($orig_image)); imageJPEG($sm_image); imagedestroy($sm_image); imageDestroy($orig_image); ?>[/code]its works great but im not sure which parts to edit to make the thumbnail slightly bigger, and does anyone have a clear understanding off what the code is actually doing? Quote Link to comment Share on other sites More sharing options...
kobmat Posted January 23, 2007 Share Posted January 23, 2007 I think changing the all 120s on the script to a higher number will make the thumbnail bigger Quote Link to comment Share on other sites More sharing options...
firpecmox Posted January 23, 2007 Share Posted January 23, 2007 How would you do that to all files uploaded to a central location Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.