Index: src/wp-includes/class-wp-image-editor-imagick.php
===================================================================
--- src/wp-includes/class-wp-image-editor-imagick.php	(revision 46807)
+++ src/wp-includes/class-wp-image-editor-imagick.php	(working copy)
@@ -332,15 +332,22 @@
 		try {
 			/*
 			 * To be more efficient, resample large images to 5x the destination size before resizing
-			 * whenever the output size is less that 1/3 of the original image size (1/3^2 ~= .111),
+			 * whenever the resampled source size is less that 1/3 of the original image size,
 			 * unless we would be resampling to a scale smaller than 128x128.
 			 */
 			if ( is_callable( array( $this->image, 'sampleImage' ) ) ) {
-				$resize_ratio  = ( $dst_w / $this->size['width'] ) * ( $dst_h / $this->size['height'] );
 				$sample_factor = 5;
 
-				if ( $resize_ratio < .111 && ( $dst_w * $sample_factor > 128 && $dst_h * $sample_factor > 128 ) ) {
-					$this->image->sampleImage( $dst_w * $sample_factor, $dst_h * $sample_factor );
+				// Resampled source size.
+				$resampled_w = $dst_w * $sample_factor;
+				$resampled_h = $dst_h * $sample_factor;
+
+				// Resampled source width * height ratio.
+				$resize_ratio = ( $resampled_w / $this->size['width'] ) * ( $resampled_h / $this->size['height'] );
+
+				// 1/3 ^ 2 ~= 0.111
+				if ( $resize_ratio < .111 && $resampled_w > 128 && $resampled_h > 128 ) {
+					$this->image->sampleImage( $resampled_w, $resampled_h );
 				}
 			}
 
