Changeset 28640 for trunk/src/wp-includes/class-wp-image-editor-gd.php
- Timestamp:
- 05/30/2014 08:05:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-gd.php
r28513 r28640 384 384 imagetruecolortopalette( $image, false, imagecolorstotal( $image ) ); 385 385 386 if ( ! $this->make_image( $filename, 'imagepng', array( $image, $filename ) ) ) 386 /* 387 * Invert the 1-100 quality scale and constrain it to 0-9, 388 * as per imagepng()'s peculiar quality parameter. 389 */ 390 $compression_level = floor( ( 101 - $this->quality ) * 0.09 ); 391 392 if ( ! $this->make_image( $filename, 'imagepng', array( $image, $filename, $compression_level ) ) ) { 387 393 return new WP_Error( 'image_save_error', __('Image Editor Save Failed') ); 394 } 388 395 } 389 396 elseif ( 'image/jpeg' == $mime_type ) {
Note: See TracChangeset
for help on using the changeset viewer.