mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Remove centreSampling option, update some expected test fixtures
See https://github.com/jcupitt/libvips/issues/705
This commit is contained in:
@@ -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],
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user