根据PHP的官方文档,imagepng()函数具有以下签名:
bool imagepng ( resource $image [, string $filename [, int $quality [, int $filters ]]] )
Run Code Online (Sandbox Code Playgroud)
我现在需要知道的是质量的标准值是什么.我在文档中的任何地方都找不到它.
是否有一些消息来源解释它或任何知道它的人?
来自php源码(gd.h):
/* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all,
* 1 is FASTEST but produces larger files, 9 provides the best
* compression (smallest files) but takes a long time to compress, and
* -1 selects the default compiled into the zlib library.
*/
Run Code Online (Sandbox Code Playgroud)
结论:基于Zlib手册(http://www.zlib.net/manual.html),默认压缩级别设置为6.
| 归档时间: |
|
| 查看次数: |
4470 次 |
| 最近记录: |