mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Respect fastShrinkOnLoad option for WebP input #3516
This commit is contained in:
@@ -205,7 +205,7 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
if (jpegShrinkOnLoad > 1 && static_cast<int>(shrink) == jpegShrinkOnLoad) {
|
||||
jpegShrinkOnLoad /= 2;
|
||||
}
|
||||
} else if (inputImageType == sharp::ImageType::WEBP && shrink > 1.0) {
|
||||
} else if (inputImageType == sharp::ImageType::WEBP && baton->fastShrinkOnLoad && shrink > 1.0) {
|
||||
// Avoid upscaling via webp
|
||||
scale = 1.0 / shrink;
|
||||
} else if (inputImageType == sharp::ImageType::SVG ||
|
||||
|
||||
Reference in New Issue
Block a user