请看一看的实况或插件的构造函数:
/**
* Thumbnail constructor
*
* @param int (optional) max width of thumbnail
* @param int (optional) max height of thumbnail
* @param boolean (optional) if true image scales
* @param boolean (optional) if true inflate small images
* @param string (optional) adapter class name
* @param array (optional) adapter options
*/
public function __construct($maxWidth = null,
$maxHeight = null,
$scale = true,
$inflate = true,
$quality = 75,
$adapterClass = null,
$adapterOptions = array()
)
您需要修改这样例如,您的参数
// so height will be calculated
$thumbnail = new sfThumbnail(80, null, true);
不好意思,但是,我不太明白插件怎么会猜测他想要100px的高度。它是否会按照原始尺寸计算比例?我该如何强制缩小缩略图? – Throoze