From de0fc07092add57cefeabfd6c40a50b33e3cbfdd Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 16 May 2023 13:53:21 +0100 Subject: [PATCH] Ensure same access method for all inputs #3669 --- docs/changelog.md | 5 +++++ src/pipeline.cc | 3 +++ 2 files changed, 8 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 6b1c540d..0fdbf687 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,11 @@ Requires libvips v8.14.2 +### v0.32.2 - TBD + +* Ensure the same access method is used for all inputs (regression in 0.32.0). + [#3669](https://github.com/lovell/sharp/issues/3669) + ### v0.32.1 - 27th April 2023 * Add experimental `unflatten` operation. diff --git a/src/pipeline.cc b/src/pipeline.cc index d8c339ff..c4e52b3a 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -399,6 +399,7 @@ class PipelineWorker : public Napi::AsyncWorker { sharp::ImageType joinImageType = sharp::ImageType::UNKNOWN; for (unsigned int i = 0; i < baton->joinChannelIn.size(); i++) { + baton->joinChannelIn[i]->access = baton->input->access; std::tie(joinImage, joinImageType) = sharp::OpenInput(baton->joinChannelIn[i]); joinImage = sharp::EnsureColourspace(joinImage, baton->colourspaceInput); image = image.bandjoin(joinImage); @@ -608,6 +609,7 @@ class PipelineWorker : public Napi::AsyncWorker { for (Composite *composite : baton->composite) { VImage compositeImage; sharp::ImageType compositeImageType = sharp::ImageType::UNKNOWN; + composite->input->access = baton->input->access; std::tie(compositeImage, compositeImageType) = sharp::OpenInput(composite->input); compositeImage = sharp::EnsureColourspace(compositeImage, baton->colourspaceInput); // Verify within current dimensions @@ -706,6 +708,7 @@ class PipelineWorker : public Napi::AsyncWorker { if (baton->boolean != nullptr) { VImage booleanImage; sharp::ImageType booleanImageType = sharp::ImageType::UNKNOWN; + baton->boolean->access = baton->input->access; std::tie(booleanImage, booleanImageType) = sharp::OpenInput(baton->boolean); booleanImage = sharp::EnsureColourspace(booleanImage, baton->colourspaceInput); image = sharp::Boolean(image, booleanImage, baton->booleanOp);