Index: media.php
===================================================================
--- media.php	(revision 17446)
+++ media.php	(working copy)
@@ -360,6 +360,14 @@
 
 		$s_x = floor( ($orig_w - $crop_w) / 2 );
 		$s_y = floor( ($orig_h - $crop_h) / 2 );
+		
+		// allow the location of the crop to be altered
+		// the returned array should be the x,y coords of the top left corner of the cropping region
+		if (has_filter( 'image_crop_location' )) {
+			list($s_x,$s_y) = apply_filters( 'image_crop_location', $orig_w, $orig_h, $crop_w, $crop_h, $s_x, $s_y );
+			$s_x = intval($s_x);
+			$s_y = intval($s_y);
+		}
 	} else {
 		// don't crop, just resize using $dest_w x $dest_h as a maximum bounding box
 		$crop_w = $orig_w;
