mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Clarify extract-resize-extract operation ordering
This commit is contained in:
@@ -250,6 +250,9 @@ function resize (widthOrOptions, height, options) {
|
||||
if (isResizeExpected(this.options)) {
|
||||
this.options.debuglog('ignoring previous resize options');
|
||||
}
|
||||
if (this.options.widthPost !== -1) {
|
||||
this.options.debuglog('operation order will be: extract, resize, extract');
|
||||
}
|
||||
if (is.defined(widthOrOptions)) {
|
||||
if (is.object(widthOrOptions) && !is.defined(options)) {
|
||||
options = widthOrOptions;
|
||||
@@ -437,7 +440,7 @@ function extend (extend) {
|
||||
*
|
||||
* - Use `extract` before `resize` for pre-resize extraction.
|
||||
* - Use `extract` after `resize` for post-resize extraction.
|
||||
* - Use `extract` before and after for both.
|
||||
* - Use `extract` twice and `resize` once for extract-then-resize-then-extract in a fixed operation order.
|
||||
*
|
||||
* @example
|
||||
* sharp(input)
|
||||
|
||||
Reference in New Issue
Block a user