diff --git a/docs/changelog.md b/docs/changelog.md index 66f5243a..6f65132d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,11 @@ Requires libvips v8.10.6 +### v0.28.3 - TBD + +* Skip shrink-on-load for multi-page WebP. + [#2714](https://github.com/lovell/sharp/issues/2714) + ### v0.28.2 - 10th May 2021 * Allow `withMetadata` to set `density`. diff --git a/src/pipeline.cc b/src/pipeline.cc index 29a9664e..c329afbf 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -227,7 +227,7 @@ class PipelineWorker : public Napi::AsyncWorker { xshrink == yshrink && xshrink >= 2 * shrink_on_load_factor && (inputImageType == sharp::ImageType::JPEG || inputImageType == sharp::ImageType::WEBP) && baton->gamma == 0 && baton->topOffsetPre == -1 && baton->trimThreshold == 0.0 && - image.width() > 3 && image.height() > 3 + image.width() > 3 && image.height() > 3 && baton->input->pages == 1 ) { if (xshrink >= 8 * shrink_on_load_factor) { xfactor = xfactor / 8;