Ticket #7748: wp-includes-media.php.patch
File wp-includes-media.php.patch, 724 bytes (added by , 16 years ago) |
---|
-
wp-includes/media.php
281 281 282 282 $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); 283 283 284 $crop_w = ceil($new_w / $size_ratio);285 $crop_h = ceil($new_h / $size_ratio);284 $crop_w = intval(round($new_w / $size_ratio)); 285 $crop_h = intval(round($new_h / $size_ratio)); 286 286 287 $s_x = floor(($orig_w - $crop_w)/2);288 $s_y = floor(($orig_h - $crop_h)/2);287 $s_x = intval(($orig_w - $crop_w)/2); 288 $s_y = intval(($orig_h - $crop_h)/2); 289 289 } 290 290 else { 291 291 // don't crop, just resize using $dest_w x $dest_h as a maximum bounding box