mirror of
https://github.com/lovell/sharp.git
synced 2025-07-11 19:40:14 +02:00
Allow full WebP alphaQuality range of 0-100 (#1290)
This commit is contained in:
parent
7bbc5176a1
commit
8b75ce6786
@ -271,10 +271,10 @@ function webp (options) {
|
||||
}
|
||||
}
|
||||
if (is.object(options) && is.defined(options.alphaQuality)) {
|
||||
if (is.integer(options.alphaQuality) && is.inRange(options.alphaQuality, 1, 100)) {
|
||||
if (is.integer(options.alphaQuality) && is.inRange(options.alphaQuality, 0, 100)) {
|
||||
this.options.webpAlphaQuality = options.alphaQuality;
|
||||
} else {
|
||||
throw new Error('Invalid webp alpha quality (integer, 1-100) ' + options.alphaQuality);
|
||||
throw new Error('Invalid webp alpha quality (integer, 0-100) ' + options.alphaQuality);
|
||||
}
|
||||
}
|
||||
if (is.object(options) && is.defined(options.lossless)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user