Remove centreSampling option, update some expected test fixtures

See https://github.com/jcupitt/libvips/issues/705
This commit is contained in:
Lovell Fuller
2017-11-26 13:49:48 +00:00
parent 6aa214181b
commit 2a18b9a8f7
19 changed files with 7 additions and 55 deletions

View File

@@ -147,8 +147,6 @@ const Sharp = function (input, options) {
extendRight: 0,
withoutEnlargement: false,
kernel: 'lanczos3',
interpolator: 'bicubic',
centreSampling: false,
fastShrinkOnLoad: true,
// operations
background: [0, 0, 0, 255],

View File

@@ -71,8 +71,6 @@ const kernel = {
* @param {Object} [options]
* @param {String} [options.kernel='lanczos3'] - the kernel to use for image reduction.
* @param {Boolean} [options.fastShrinkOnLoad=true] - take greater advantage of the JPEG and WebP shrink-on-load feature, which can lead to a slight moiré pattern on some images.
* @param {Boolean} [options.centreSampling=false] - use *magick centre sampling convention instead of corner sampling.
* @param {Boolean} [options.centerSampling=false] - alternative spelling of centreSampling.
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/
@@ -104,11 +102,6 @@ function resize (width, height, options) {
throw is.invalidParameterError('kernel', 'valid kernel name', options.kernel);
}
}
// Centre sampling
options.centreSampling = is.bool(options.centerSampling) ? options.centerSampling : options.centreSampling;
if (is.defined(options.centreSampling)) {
this._setBooleanOption('centreSampling', options.centreSampling);
}
// Shrink on load
if (is.defined(options.fastShrinkOnLoad)) {
this._setBooleanOption('fastShrinkOnLoad', options.fastShrinkOnLoad);