From 6018cd50b6e474cac9a7df63ef996e8693a76869 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 1 Aug 2014 18:43:16 +0000 Subject: [PATCH] Revert [28640] as per @DH-Shredder. See #24380. Built from https://develop.svn.wordpress.org/trunk@29345 git-svn-id: http://core.svn.wordpress.org/trunk@29123 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-image-editor-gd.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index 548882dfae..ef804571c6 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -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() ) ) )