[wp-trac] [WordPress Trac] #24380: Missing Compression Parameter in WP_Image_Editor_GD

WordPress Trac noreply at wordpress.org
Sat May 31 14:13:06 UTC 2014


#24380: Missing Compression Parameter in WP_Image_Editor_GD
--------------------------------------+-----------------------------
 Reporter:  MuViMoTV                  |       Owner:  wonderboymusic
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.0
Component:  Media                     |     Version:  3.5.1
 Severity:  normal                    |  Resolution:
 Keywords:  2nd-opinion dev-feedback  |     Focuses:
--------------------------------------+-----------------------------
Changes (by ericlewis):

 * keywords:  has-patch => 2nd-opinion dev-feedback


Comment:

 Replying to [comment:27 mikemanger]:
 > Anyone care to explain why we are converting from high to low? The
 original statement that it goes "0->9 from good to bad" is wrong. PNG
 compression is lossless so there is no such thing as "bad" compression
 with regards to image quality, just a trade off between file size and
 compression speed. Best explanation I can find is in the
 [http://www.php.net/manual/en/function.imagepng.php#106093 discussion on
 the PHP documentation page].

 It seems there's some rather widespread confusion of how the `$quality`
 parameter for `imagepng()` works. Thanks for reopening this, you're
 completely on point here.

 Since actual quality has nothing to do with the operation at hand, would
 it be useful to create a PNG-specific class property like
 `compression_level` to use here instead?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24380#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list