如何使GD支持webpq
2016-05-10 15:58
190 查看
因为项目原因,需要支持webp格式,扒文无数,终于解决。
我的环境如下:CentOS6.4/PHP5.6.16。
1、编译安装libvpx(https://github.com/webmproject/libvpx/releases)。我用的是1.5的,假设安装到/usr/local/lib下
2、编译安装libwebp(https://github.com/webmproject/libwebp/releases)。我用的是0.5的。其实这个我记不太清楚是不是必装的了--_--
3、下载个php5.6.16的源码包,其他编译参数就不提了,但是一定要加上--with-vpx-dir=/usr/local/lib(libvpx目录)。
就是这么简单,不过我也是扒文无数才找到的。。。经过漫长的编译,再来个phpinfo()。有没有发现gd下面有个
参阅:https://bugs.php.net/bug.php?id=67999:
我的环境如下:CentOS6.4/PHP5.6.16。
1、编译安装libvpx(https://github.com/webmproject/libvpx/releases)。我用的是1.5的,假设安装到/usr/local/lib下
2、编译安装libwebp(https://github.com/webmproject/libwebp/releases)。我用的是0.5的。其实这个我记不太清楚是不是必装的了--_--
3、下载个php5.6.16的源码包,其他编译参数就不提了,但是一定要加上--with-vpx-dir=/usr/local/lib(libvpx目录)。
就是这么简单,不过我也是扒文无数才找到的。。。经过漫长的编译,再来个phpinfo()。有没有发现gd下面有个
WebP Support | enabled |
It's not clear to me whether this report is Windows specific. If so, latest PHP 5.6.x does have support for WebP enabled. Otherwise, when compiling from the sources on other OS the --with-vpx-dir= option has to be passed to configure.
相关文章推荐
- libimobiledevice安装步骤
- 备份mysql
- MySQL逗号分割字段的行列转换测试改进
- 报错Resource temporarily unavailable
- java Map练习-获取字符串中字母出现次数(TreeMap实现)
- MVC、MVP、MVVM模式总结
- 你的Input的name属性值为abc[],传到controller的方法
- notifyDataSetChanged和notifyDataSetInvalidated区别
- VS2010 自带的SQL SERVER 2008 EXPRESS 如何连接?
- 2001
- 推荐系统-利用用户行为数据
- python automated headers 自动生成格式化 注释文件 docstrings
- C++实验5-数组分离
- 网站运营计划【运营者】
- 巧解八皇后问题
- C# 复制PDF页面到另一个PDF文档
- 删除 Nodejs的方法,记录一下
- 深入剖析JavaScript:Object类型
- thinkPHP
- SQL中union 与union all的用法