Docs refresh for cropOffsetLeft/cropOffsetTop

This commit is contained in:
Lovell Fuller
2017-11-25 11:24:53 +00:00
parent e0f0baf164
commit 7067beda99
2 changed files with 8 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ const sharp = require('../build/Release/sharp.node');
* with JPEG, PNG, WebP, TIFF, DZI, and libvips' V format supported.
* Note that raw pixel data is only supported for buffer output.
*
* A Promises/A+ promise is returned when `callback` is not provided.
* A `Promise` is returned when `callback` is not provided.
*
* @param {String} fileOut - the path to write the image data to.
* @param {Function} [callback] - called on completion with two arguments `(err, info)`.
@@ -54,7 +54,9 @@ function toFile (fileOut, callback) {
* - `data` is the output image data.
* - `info` contains the output image `format`, `size` (bytes), `width`, `height`,
* `channels` and `premultiplied` (indicating if premultiplication was used).
* A Promise is returned when `callback` is not provided.
* When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`.
*
* A `Promise` is returned when `callback` is not provided.
*
* @param {Object} [options]
* @param {Boolean} [options.resolveWithObject] Resolve the Promise with an Object containing `data` and `info` properties instead of resolving only with `data`.