WordPress.org

Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #24380, comment 22


Ignore:
Timestamp:
05/01/2014 11:43:06 AM (6 years ago)
Author:
mikemanger
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24380, comment 22

    v2 v3  
    1 I feel that whilst converting 1-100 to 9-0 is technically correct, it is a bit confusing and could have some unwanted results (the default value for `quality` is 90 which would give the worst compression, not the best).
     1I feel that whilst converting 1-100 to 9-0 is technically correct, it is a bit confusing (PNG is lossless, so more compression doesn't mean less quality) and could have some unwanted results (the default value for `quality` is 90 which would give the worst compression, not the best).
    22
    33I have updated the GD class to convert quality from 1-100 to 0-9, the code (I hope) reads a bit better and as a bonus this better matches how the [http://www.imagemagick.org/script/command-line-options.php#quality ImageMagick library handles the quality value]. The main difference is that if a quality value of 1-10 is passed to GD then no compression is applied to the image.