PHP的imagepng()函数中质量属性的标准值

tyr*_*dis 3 php gd

根据PHP的官方文档,imagepng()函数具有以下签名:

bool imagepng ( resource $image [, string $filename [, int $quality [, int $filters ]]] )
Run Code Online (Sandbox Code Playgroud)

我现在需要知道的是质量的标准值是什么.我在文档中的任何地方都找不到它.

是否有一些消息来源解释它或任何知道它的人?

fel*_*igl 9

来自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.