Ticket #9245: imagejpeg_filter.9245.diff
File imagejpeg_filter.9245.diff, 1.0 KB (added by , 16 years ago) |
---|
-
wp-includes/media.php
378 378 else { 379 379 // all other formats are converted to jpg 380 380 $destfilename = "{$dir}/{$name}-{$suffix}.jpg"; 381 if (!imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality ) ) )381 if (!imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality, 'image_resize' ) ) ) 382 382 return new WP_Error('resize_path_invalid', __( 'Resize path invalid' )); 383 383 } 384 384 -
wp-admin/includes/image.php
68 68 69 69 $dst_file = preg_replace( '/\\.[^\\.]+$/', '.jpg', $dst_file ); 70 70 71 if ( imagejpeg( $dst, $dst_file ) )71 if ( imagejpeg( $dst, $dst_file, apply_filters( 'jpeg_quality', 90, 'wp_crop_image' ) ) ) 72 72 return $dst_file; 73 73 else 74 74 return false;