mirror of
https://github.com/lovell/sharp.git
synced 2025-07-12 12:00:14 +02:00
Skip shrink-on-load for multi-page WebP #2714
This commit is contained in:
parent
a2d3fa729f
commit
5bd5e5052a
@ -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`.
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user