





























Image Thumbnailer for Zend Framework 2
支持的功能:图片缩放,剪裁,填充,旋转,显示和存储图片。
例子:
将下面的代码加入controller中, 显示一副小图片:
$thumbnailer = $this->getServiceLocator()->get('WebinoImageThumb');
$imagePath = 'public/images/example.jpg';
$thumb = $thumbnailer->create($imagePath, $options = array(), $plugins = array());
$thumb->resize(100, 100);
$thumb->show();
// or/and
$thumb->save('public/images/resized.jpg');
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。