script to generate thumbnail. If image you are uploading is in proper ratio it will resize and if not then crop image. It maintain actual look of image. Below how we can integrate this.
require_once ('includes/ThumbLib.inc.php');
$res1 =move_uploaded_file ( string $filename , string $destination )
$thumb = PhpThumbFactory::create($destination/$filename);
$thumb->adaptiveResize(320,50)->save("thumbnaildestination/Thumb_".$filename);
?>
you can learn more about from http://phpthumb.gxdlabs.com/
No comments:
Post a Comment