Upgrade to libvips v8.8.0, remove deprecated overlayWith

This commit is contained in:
Lovell Fuller
2019-05-21 23:11:27 +01:00
parent cfa4f7d45c
commit 631a3597c7
43 changed files with 3064 additions and 3563 deletions

View File

@@ -1,7 +1,5 @@
'use strict';
const deprecate = require('util').deprecate;
const is = require('./is');
/**
@@ -154,21 +152,11 @@ function composite (images) {
return this;
}
/**
* @deprecated
* @private
*/
function overlayWith (input, options) {
const blend = (is.object(options) && options.cutout) ? 'dest-in' : 'over';
return this.composite([Object.assign({ input, blend }, options)]);
}
/**
* Decorate the Sharp prototype with composite-related functions.
* @private
*/
module.exports = function (Sharp) {
Sharp.prototype.composite = composite;
Sharp.prototype.overlayWith = deprecate(overlayWith, 'overlayWith(input, options) is deprecated, use composite([{ input, ...options }]) instead');
Sharp.blend = blend;
};