Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 18627)
+++ wp-includes/media.php	(working copy)
@@ -301,8 +301,8 @@
 		// The larger ratio fits, and is likely to be a more "snug" fit.
 		$ratio = $larger_ratio;
 
-	$w = intval( $current_width  * $ratio );
-	$h = intval( $current_height * $ratio );
+	$w = round( $current_width  * $ratio );
+	$h = round( $current_height * $ratio );
 
 	// Sometimes, due to rounding, we'll end up with a result like this: 465x700 in a 177x177 box is 117x176... a pixel short
 	// We also have issues with recursive calls resulting in an ever-changing result. Contraining to the result of a constraint should yield the original result.
@@ -312,7 +312,7 @@
 	if ( $did_height && $h == $max_height - 1 )
 		$h = $max_height; // Round it up
 
-	return array( $w, $h );
+	return apply_filters( 'wp_constrain_dimensions', array( $w, $h ), $current_width, $current_height, $max_width, $max_height );
 }
 
 /**
