diff --git a/docs/api-resize.md b/docs/api-resize.md index adb9488c..71438b4b 100644 --- a/docs/api-resize.md +++ b/docs/api-resize.md @@ -6,8 +6,8 @@ Resize image to `width`, `height` or `width x height`. When both a `width` and `height` are provided, the possible methods by which the image should **fit** these are: -- `cover`: Crop to cover both provided dimensions (the default). -- `contain`: Embed within both provided dimensions. +- `cover`: (default) Preserving aspect ratio, ensure the image covers both provided dimensions by cropping/clipping to fit. +- `contain`: Preserving aspect ratio, contain within both provided dimensions using "letterboxing" where necessary. - `fill`: Ignore the aspect ratio of the input and stretch to both provided dimensions. - `inside`: Preserving aspect ratio, resize the image to be as large as possible while ensuring its dimensions are less than or equal to both those specified. - `outside`: Preserving aspect ratio, resize the image to be as small as possible while ensuring its dimensions are greater than or equal to both those specified. diff --git a/lib/resize.js b/lib/resize.js index 7e2f4b74..f03ce480 100644 --- a/lib/resize.js +++ b/lib/resize.js @@ -96,8 +96,8 @@ function isRotationExpected (options) { * Resize image to `width`, `height` or `width x height`. * * When both a `width` and `height` are provided, the possible methods by which the image should **fit** these are: - * - `cover`: Crop to cover both provided dimensions (the default). - * - `contain`: Embed within both provided dimensions. + * - `cover`: (default) Preserving aspect ratio, ensure the image covers both provided dimensions by cropping/clipping to fit. + * - `contain`: Preserving aspect ratio, contain within both provided dimensions using "letterboxing" where necessary. * - `fill`: Ignore the aspect ratio of the input and stretch to both provided dimensions. * - `inside`: Preserving aspect ratio, resize the image to be as large as possible while ensuring its dimensions are less than or equal to both those specified. * - `outside`: Preserving aspect ratio, resize the image to be as small as possible while ensuring its dimensions are greater than or equal to both those specified.