Ticket #24380: class-wp-image-editor-gd.2.diff
File class-wp-image-editor-gd.2.diff, 818 bytes (added by , 11 years ago) |
---|
-
wp-includes/class-wp-image-editor-gd.php
353 353 if ( function_exists('imageistruecolor') && ! imageistruecolor( $image ) ) 354 354 imagetruecolortopalette( $image, false, imagecolorstotal( $image ) ); 355 355 356 if ( ! $this->make_image( $filename, 'imagepng', array( $image, $filename ) ) ) 356 $compression = - ( ( 0.09 * $this->quality ) - 9 ); // from 0 (no compression) to 9. 357 358 if ( ! $this->make_image( $filename, 'imagepng', array( $image, $filename, $compression ) ) ) 357 359 return new WP_Error( 'image_save_error', __('Image Editor Save Failed') ); 358 360 } 359 361 elseif ( 'image/jpeg' == $mime_type ) {