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? Link to comment https://forums.phpfreaks.com/topic/35296-thumbnail-script/ 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 Link to comment https://forums.phpfreaks.com/topic/35296-thumbnail-script/#findComment-166838 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 Link to comment https://forums.phpfreaks.com/topic/35296-thumbnail-script/#findComment-166939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.