cthumb 缩略图生成

  1. Documentation
  2. Change Log

网上找来的一个生成缩略图的函数

Resources

Documentation

Requirements
  • Yii 1.0 or above
Installation
  • Extract the release file under protected/extensions
  • extension=php_gd2.dll
    Usage

    See the following code example:

...				
$im = null;
$imagetype = strtolower($model->image->extensionName)
if($imagetype == 'gif')
    $im = imagecreatefromgif($path);
else if ($imagetype == 'jpg')
    $im = imagecreatefromjpeg($path);
else if ($imagetype == 'png')
    $im = imagecreatefrompng($path);
CThumb::resizeImage ( 
$im,100, 100,
'd:\upload\head\\thumb\\test' . $model->image->extensionName, $model->image->extensionName );
...
				

Change Log

December 17, 2009
  • Initial release.
0 0
2 followers
1 608 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: File System
Tags:
Developed by: bluefinger
Created on: Dec 17, 2009
Last updated: 14 years ago

Downloads

show all