Revert [28640] as per @DH-Shredder.

See #24380.


git-svn-id: https://develop.svn.wordpress.org/trunk@29345 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-08-01 18:42:46 +00:00
parent 91517ce620
commit 4465f7922a
1 changed files with 1 additions and 8 deletions

View File

@ -383,15 +383,8 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
if ( function_exists('imageistruecolor') && ! imageistruecolor( $image ) )
imagetruecolortopalette( $image, false, imagecolorstotal( $image ) );
/*
* Invert the 1-100 quality scale and constrain it to 0-9,
* as per imagepng()'s peculiar quality parameter.
*/
$compression_level = floor( ( 101 - $this->quality ) * 0.09 );
if ( ! $this->make_image( $filename, 'imagepng', array( $image, $filename, $compression_level ) ) ) {
if ( ! $this->make_image( $filename, 'imagepng', array( $image, $filename ) ) )
return new WP_Error( 'image_save_error', __('Image Editor Save Failed') );
}
}
elseif ( 'image/jpeg' == $mime_type ) {
if ( ! $this->make_image( $filename, 'imagejpeg', array( $image, $filename, $this->get_quality() ) ) )