Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #24380, comment 22


Ignore:
Timestamp:
05/01/2014 11:20:57 AM (10 years ago)
Author:
mikemanger
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24380, comment 22

    initial v1  
    11I 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).
    22
    3 I 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 functions]. The main difference is that if a value of 1-10 is set then no compression is applied to the image.
     3I 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 functions]. The main difference is that if a quality value of 1-10 is set then no compression is applied to the image.
    44
    55To accompany `jpeg_quality`, I have also added a new filter called `png_compression_level` in the main WP_Image_Editor class.