--- media.php (latest)
+++ media.php (working copy)
@@ -327,6 +327,8 @@
  * portion of the image will be cropped out and resized to the required size.
  *
  * @since 2.5.0
+ * @uses apply_filters() Calls 'image_resize_dimensions' on $orig_w, $orig_h, $dest_w, $dest_h and
+ *		$crop to provide custom resize dimensions.
  *
  * @param int $orig_w Original width.
  * @param int $orig_h Original height.
@@ -343,6 +345,11 @@
 	if ($dest_w <= 0 && $dest_h <= 0)
 		return false;
 
+	// plugins can use this to provide custom resize dimensions
+	$output = apply_filters('image_resize_dimensions', null, $orig_w, $orig_h, $dest_w, $dest_h, $crop);
+	if ( $output != null )
+		return $output;
+
 	if ( $crop ) {
 		// crop the largest possible portion of the original image that we can size to $dest_w x $dest_h
 		$aspect_ratio = $orig_w / $orig_h;
