根据PHP的官方文档中imagepng()函数具有以下特征:标准值()函数
bool imagepng (resource $image [, string $filename [, int $quality [, int $filters ]]])
我现在需要知道的是什么$质量的标准值是。我无法在文档中的任何地方找到它。
有没有解释它的人或知道它的人?
根据PHP的官方文档中imagepng()函数具有以下特征:标准值()函数
bool imagepng (resource $image [, string $filename [, int $quality [, int $filters ]]])
我现在需要知道的是什么$质量的标准值是。我无法在文档中的任何地方找到它。
有没有解释它的人或知道它的人?
:
/* 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.
*/
结论: 基于Zlib手册(http://www.zlib.net/manual.html)默认的压缩级别设置为6.
那不是我的问题。我想知道PHP的价值,如果我没有指定一个非常简单的 – tyrondis 2011-03-21 13:58:04
:查看源代码,或保存图像11次,没有值和每个0-9值。无论哪一个匹配的“无价值”保存是你的默认值。 – 2011-03-21 14:09:52
在PHP的源代码质量参数默认为0.但我没有想法该值对于图像处理是最佳的。
static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)()) { zval *imgind; char *file = NULL; long quality = 0, type = 0;
非常感谢! – tyrondis 2011-03-21 14:32:53