Ensure trim is no-op when it would reduce to nothing #3223

This commit is contained in:
Lovell Fuller
2022-07-08 21:06:58 +01:00
parent 6c2e2be41d
commit cbf741cac7
5 changed files with 29 additions and 3 deletions

View File

@@ -433,6 +433,8 @@ function extract (options) {
*
* Images with an alpha channel will use the combined bounding box of alpha and non-alpha channels.
*
* If the result of this operation would trim an image to nothing then no change is made.
*
* The `info` response Object, obtained from callback of `.toFile()` or `.toBuffer()`,
* will contain `trimOffsetLeft` and `trimOffsetTop` properties.
*