惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
J
Java Code Geeks
Martin Fowler
Martin Fowler
博客园 - Franky
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
B
Blog
The Cloudflare Blog
F
Fortinet All Blogs
量子位
腾讯CDC
博客园 - 司徒正美
D
Docker
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
T
The Blog of Author Tim Ferriss
V
Visual Studio Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
D
DataBreaches.Net
小众软件
小众软件

博客园 - 天蝎

两岸三地在线编程学习网站 PHP依赖管理器- Composer Local Temporary Tables and Table Variables Logging with SQL Server SQL Server Database Partitioning Myths and Truths 转载:什么是SHELL 转载:Plan freezing and other plan guide enhancements in SQL Server 2008 - 天蝎 转载:Breaking ownership chaining within a schema in SQL Server 转载:如何正确理解自动化测试技术 存储过程 SOA的设计理念 转载: The DBA as Detective: Troubleshooting Locking and Blocking 转载:锁的概述 转载: Microsoft SQL Server roles Why BCP connects to SQL Server instance which start with account of Network Service fail? Execution plans, estimated vs actual Finding the causes of poor performance in SQL Server Enabling Dedicated Administrator Connection Feature in SQL Server 2008 .net中应用程序域的概念
WebinoImageThumb - ZendFramework 2中操作图片的API
天蝎 · 2013-12-17 · via 博客园 - 天蝎

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');

链接:https://github.com/webino/WebinoImageThumb