Ticket #15989: media.diff
| File media.diff, 731 bytes (added by buzz_matt, 2 years ago) |
|---|
-
media.php
360 360 361 361 $s_x = floor( ($orig_w - $crop_w) / 2 ); 362 362 $s_y = floor( ($orig_h - $crop_h) / 2 ); 363 364 // allow the location of the crop to be altered 365 // the returned array should be the x,y coords of the top left corner of the cropping region 366 if (has_filter( 'image_crop_location' )) { 367 list($s_x,$s_y) = apply_filters( 'image_crop_location', $orig_w, $orig_h, $crop_w, $crop_h, $s_x, $s_y ); 368 $s_x = intval($s_x); 369 $s_y = intval($s_y); 370 } 363 371 } else { 364 372 // don't crop, just resize using $dest_w x $dest_h as a maximum bounding box 365 373 $crop_w = $orig_w;