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');
皓首穷经,十年磨一剑