diff --git a/README.md b/README.md index eecd87c1..6c64cc2c 100755 --- a/README.md +++ b/README.md @@ -389,6 +389,10 @@ the `width` and `height` specified. Both `width` and `height` must be provided via `resize` otherwise the behaviour will default to `crop`. +#### ignoreAspectRatio() + +Ignoring the aspect ratio of the input, stretch the image to the exact `width` and/or `height` provided via `resize`. + #### background(rgba) Set the background for the `embed` and `flatten` operations. diff --git a/index.js b/index.js index 7e2bd44a..04470678 100755 --- a/index.js +++ b/index.js @@ -185,6 +185,10 @@ Sharp.prototype.min = function() { return this; }; +/* + Ignoring the aspect ratio of the input, stretch the image to + the exact width and/or height provided via the resize method. +*/ Sharp.prototype.ignoreAspectRatio = function() { this.options.canvas = 'ignore_aspect'; return this;