Add trimOffsetLeft, trimOffsetTop to trim response #914

This commit is contained in:
Lovell Fuller
2018-10-02 20:16:00 +01:00
parent c431909f35
commit 0725378257
5 changed files with 20 additions and 0 deletions

View File

@@ -361,6 +361,7 @@ function extract (options) {
/**
* Trim "boring" pixels from all edges that contain values similar to the top-left pixel.
* The `info` response Object will contain `trimOffsetLeft` and `trimOffsetTop` properties.
* @param {Number} [threshold=10] the allowed difference from the top-left pixel, a number greater than zero.
* @returns {Sharp}
* @throws {Error} Invalid parameters