Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 20631)
+++ wp-includes/media.php	(working copy)
@@ -337,10 +337,14 @@
  */
 function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) {
 
-	if ($orig_w <= 0 || $orig_h <= 0)
+	// plugins can use this to provide custom resize dimensions
+	if ( $out = apply_filters( 'image_resize_dimensions', false, $orig_w, $orig_h, $dest_w, $dest_h, $crop ) )
+		return $out;
+
+	if ( $orig_w <= 0 || $orig_h <= 0 )
 		return false;
 	// at least one of dest_w or dest_h must be specific
-	if ($dest_w <= 0 && $dest_h <= 0)
+	if ( $dest_w <= 0 && $dest_h <= 0 )
 		return false;
 
 	if ( $crop ) {
