mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Remove previously-deprecated reductionEffort and speed options
This commit is contained in:
@@ -500,12 +500,11 @@ function webp (options) {
|
||||
if (is.defined(options.smartSubsample)) {
|
||||
this._setBooleanOption('webpSmartSubsample', options.smartSubsample);
|
||||
}
|
||||
const effort = is.defined(options.effort) ? options.effort : options.reductionEffort;
|
||||
if (is.defined(effort)) {
|
||||
if (is.integer(effort) && is.inRange(effort, 0, 6)) {
|
||||
this.options.webpEffort = effort;
|
||||
if (is.defined(options.effort)) {
|
||||
if (is.integer(options.effort) && is.inRange(options.effort, 0, 6)) {
|
||||
this.options.webpEffort = options.effort;
|
||||
} else {
|
||||
throw is.invalidParameterError('effort', 'integer between 0 and 6', effort);
|
||||
throw is.invalidParameterError('effort', 'integer between 0 and 6', options.effort);
|
||||
}
|
||||
}
|
||||
if (is.defined(options.minSize)) {
|
||||
@@ -884,12 +883,6 @@ function heif (options) {
|
||||
} else {
|
||||
throw is.invalidParameterError('effort', 'integer between 0 and 9', options.effort);
|
||||
}
|
||||
} else if (is.defined(options.speed)) {
|
||||
if (is.integer(options.speed) && is.inRange(options.speed, 0, 9)) {
|
||||
this.options.heifEffort = 9 - options.speed;
|
||||
} else {
|
||||
throw is.invalidParameterError('speed', 'integer between 0 and 9', options.speed);
|
||||
}
|
||||
}
|
||||
if (is.defined(options.chromaSubsampling)) {
|
||||
if (is.string(options.chromaSubsampling) && is.inArray(options.chromaSubsampling, ['4:2:0', '4:4:4'])) {
|
||||
|
||||
Reference in New Issue
Block a user