Doc #74364 [Ver->Csd]: imagepng misses default value for $quality param

From: Date: Wed, 05 Apr 2017 10:11:49 +0000
Subject: Doc #74364 [Ver->Csd]: imagepng misses default value for $quality param
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14584@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74364&edit=1 ID: 74364 Updated by: peehaa@php.net Reported by: maggus dot staab at googlemail dot com Summary: imagepng misses default value for $quality param -Status: Verified +Status: Closed Type: Documentation Problem Package: GD related PHP Version: Irrelevant -Assigned To: +Assigned To: peehaa Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2017-04-05 10:10:22] maggus dot staab at googlemail dot com looks great thx. wasnt aware of the tool, will play with it in the future. thx! ------------------------------------------------------------------------ [2017-04-05 09:16:11] peehaa@php.net Does this work for you? Create a patch here http://edit.php.net/?patchID=2445&project=PHP ------------------------------------------------------------------------ [2017-04-03 10:23:35] maggus dot staab at googlemail dot com I guess you are right. when the default of "6" is mentioned this might already ring a bell that 9 is not the best for some reason in all cases ;-). thanks! ------------------------------------------------------------------------ [2017-04-03 09:54:36] requinix@php.net The average PHP developer doesn't know about the structure of PNG images or about zlib compression, so telling them the default is Z_DEFAULT_COMPRESSION will just confuse them. Similarly, drowning them in information about the relationship between compression level and file size/runtime will have their eyes glossing over. I'd keep it simple: the default level is 6 [I doubt it will change anytime soon] and is a good compromise between the speed of level=0 and the compression of level=9. If there's something more in-depth to be said then it would probably be best as a link to some external resource - minimizing the number of pages in the manual that can only be maintained by people with specialized knowledge. ------------------------------------------------------------------------ [2017-04-03 09:31:21] maggus dot staab at googlemail dot com thx for your in-depth analysis. things seem to be more complicated then initially thought ;-). would it make sense to mention in the docs that the param defaults to zlibs default compresssion Z_DEFAULT_COMPRESSION ? maybe it would also be worthwhile when it will be mentioned that this parameter is not a linear 0 is worst and 9 is best compression thing but the "optimal" value lies somehow in the middle? A lot of people are used to jpeg which works best when doing the most aggressive optimization ahead of time. see also http://marcjschmidt.de/blog/2013/10/25/php-imagepng-performance-slow.html ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=74364 -- Edit this bug report at https://bugs.php.net/bug.php?id=74364&edit=1

« previous php.doc.bugs (#14584) next »