diff --git a/manualcrop.css b/manualcrop.css
index f1e2a6d..34b1b86 100644
--- a/manualcrop.css
+++ b/manualcrop.css
@@ -85,7 +85,7 @@
 /* Croptool: buttons */
 .manualcrop-overlay .manualcrop-buttons {
   position: absolute;
-  bottom: 0.8em;
+  bottom: 2.8em;
   right: 0em;
   z-index: 10004;
 }
diff --git a/manualcrop.js b/manualcrop.js
index 0435e1b..7bcba66 100644
--- a/manualcrop.js
+++ b/manualcrop.js
@@ -320,6 +320,51 @@ ManualCrop.resetSelection = function() {
 }
 
 /**
+ * Maximize the selection to fill cointainer, respecting the ratio.
+ */
+ManualCrop.maximizeSelection = function() {
+  if (ManualCrop.croptool) {
+    image = $('img.manualcrop-image', ManualCrop.croptool);
+
+    // Get the original width and height.
+    var origWidth = ManualCrop.parseInt(image.get(0).getAttribute('width'));
+    var origHeight = ManualCrop.parseInt(image.get(0).getAttribute('height'))
+    var options=ManualCrop.widget.getOptions();
+
+    if (typeof options.aspectRatio != 'undefined' && options.aspectRatio != '') {
+      var x, y, width, height;
+      var ar = options.aspectRatio.match(/([0-9]+):([0-9]+)/);
+      var ratioWidth = parseInt(ar[1]);
+      var ratioHeight = parseInt(ar[2]);
+
+      if (ratioWidth / ratioHeight > origWidth / origHeight) {
+        //crop from top and bottom
+        width = origWidth;
+        x = 0;
+        height = ( width / ratioWidth ) * ratioHeight;
+        y = ( origHeight - height ) / 2;
+      }
+      else {
+        //crop from sides
+        height = origHeight;
+        y = 0;
+        width = ( height / ratioHeight ) * ratioWidth;
+        x = ( origWidth - width) / 2;
+      }
+      ManualCrop.widget.setSelection(x, y, x + width, y + height);
+    }
+    else{
+      ManualCrop.widget.setSelection(0, 0, origWidth, origHeight);
+    }
+
+    ManualCrop.widget.setOptions({hide: false, show: true});
+    ManualCrop.widget.update();
+    ManualCrop.updateSelection(null, ManualCrop.widget.getSelection());
+
+  }
+}
+
+/**
  * Remove the selection.
  */
 ManualCrop.clearSelection = function() {
@@ -362,6 +407,7 @@ ManualCrop.updateSelection = function(image, selection) {
       $('.manualcrop-selection-y', ManualCrop.croptool).text(selection.y1);
       $('.manualcrop-selection-width', ManualCrop.croptool).text(selection.width);
       $('.manualcrop-selection-height', ManualCrop.croptool).text(selection.height);
+      $('.manualcrop-selection-ratio', ManualCrop.croptool).text(selection.width >= selection.height ? ( selection.width / selection.height ).toFixed(3) + ':1' : '1:' + ( selection.height / selection.width ).toFixed(3) );
 
       // Update the instant preview.
       if (instantPreview.length) {
diff --git a/manualcrop.module b/manualcrop.module
index 1b67dee..c7512eb 100644
--- a/manualcrop.module
+++ b/manualcrop.module
@@ -760,12 +760,14 @@ function theme_manualcrop_croptool_overlay($variables) {
     $output .= t('Selection x') . ': <span class="manualcrop-details-value manualcrop-selection-x">-</span>, ';
     $output .= t('Selection y') . ': <span class="manualcrop-details-value manualcrop-selection-y">-</span>, ';
     $output .= t('Selection width') . ': <span class="manualcrop-details-value manualcrop-selection-width">-</span>, ';
-    $output .= t('Selection height') . ': <span class="manualcrop-details-value manualcrop-selection-height">-</span>';
+    $output .= t('Selection height') . ': <span class="manualcrop-details-value manualcrop-selection-height">-</span>, ';
+    $output .= t('Selection ratio') . ': <span class="manualcrop-details-value manualcrop-selection-ratio">-</span>';
     $output .= '</div>';
   }
 
   $output .= '<div class="manualcrop-buttons">';
   $output .= '<a class="manualcrop-button manualcrop-reset" href="javascript:void(0);" onmousedown="ManualCrop.closeCroptool(true);">' . t('Cancel') . '</a>';
+  $output .= '<a class="manualcrop-button manualcrop-maximize" href="javascript:void(0);" onmousedown="ManualCrop.maximizeSelection();">' . t('Maximize selection') . '</a>';
   $output .= '<a class="manualcrop-button manualcrop-clear" href="javascript:void(0);" onmousedown="ManualCrop.clearSelection();">' . t('Remove selection') . '</a>';
   $output .= '<a class="manualcrop-button manualcrop-reset" href="javascript:void(0);" onmousedown="ManualCrop.resetSelection();">' . t('Revert selection') . '</a>';
   $output .= '<a class="manualcrop-button manualcrop-close" href="javascript:void(0);" onmousedown="ManualCrop.closeCroptool();">' . t('Save') . '</a>';
@@ -805,7 +807,8 @@ function theme_manualcrop_croptool_inline($variables) {
     $output .= t('Selection x') . ': <span class="manualcrop-details-value manualcrop-selection-x">-</span><br />';
     $output .= t('Selection y') . ': <span class="manualcrop-details-value manualcrop-selection-y">-</span><br />';
     $output .= t('Selection width') . ': <span class="manualcrop-details-value manualcrop-selection-width">-</span><br />';
-    $output .= t('Selection height') . ': <span class="manualcrop-details-value manualcrop-selection-height">-</span>';
+    $output .= t('Selection height') . ': <span class="manualcrop-details-value manualcrop-selection-height">-</span><br />';
+    $output .= t('Selection ratio') . ': <span class="manualcrop-details-value manualcrop-selection-ratio">-</span>';
     $output .= '</div>';
   }
 
@@ -813,6 +816,7 @@ function theme_manualcrop_croptool_inline($variables) {
   $output .= '<input type="button" value="' . t('Save') . '" class="manualcrop-button manualcrop-close form-submit" onmousedown="ManualCrop.closeCroptool();" />';
   $output .= '<input type="button" value="' . t('Revert selection') . '" class="manualcrop-button manualcrop-reset form-submit" onmousedown="ManualCrop.resetSelection();" />';
   $output .= '<input type="button" value="' . t('Remove selection') . '" class="manualcrop-button manualcrop-clear form-submit" onmousedown="ManualCrop.clearSelection();" />';
+  $output .= '<input type="button" value="' . t('Maximize selection') . '" class="manualcrop-button manualcrop-maximize form-submit" onmousedown="ManualCrop.maximizeSelection();" />';
   $output .= '<input type="button" value="' . t('Cancel') . '" class="manualcrop-button manualcrop-cencel form-submit" onmousedown="ManualCrop.closeCroptool(true);" />';
   $output .= '</div>';
 
