Skip to content

Commit

Permalink
Use vips scaling for webp fixes lovell#3262
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Jun 17, 2022
1 parent 4662527 commit 5827b52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pipeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class PipelineWorker : public Napi::AsyncWorker {
->set("access", baton->input->access)
->set("scale", scale)
->set("fail_on", baton->input->failOn);
if (inputImageType == sharp::ImageType::WEBP) {
if (scale < 1.0 && inputImageType == sharp::ImageType::WEBP) {
option->set("n", baton->input->pages);
option->set("page", baton->input->page);

Expand Down

0 comments on commit 5827b52

Please sign in to comment.