Create blank image (width, height, channels, background) #470

This commit is contained in:
Lovell Fuller
2017-03-11 11:46:01 +00:00
parent 701b1c4216
commit 1aa053ce6f
12 changed files with 200 additions and 26 deletions

View File

@@ -38,6 +38,11 @@ const is = require('./is');
* @param {Number} [options.raw.width]
* @param {Number} [options.raw.height]
* @param {Number} [options.raw.channels]
* @param {Object} [options.create] - describes a blank overlay to be created.
* @param {Number} [options.create.width]
* @param {Number} [options.create.height]
* @param {Number} [options.create.channels] - 3-4
* @param {String|Object} [options.create.background] - parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/