Prevent over-compute in affine rotate #3722

This commit is contained in:
Lovell Fuller
2023-07-09 09:04:07 +01:00
parent 0da55bab7e
commit 14c3346800
3 changed files with 20 additions and 1 deletions

View File

@@ -116,7 +116,7 @@ class PipelineWorker : public Napi::AsyncWorker {
MultiPageUnsupported(nPages, "Rotate");
std::vector<double> background;
std::tie(image, background) = sharp::ApplyAlpha(image, baton->rotationBackground, FALSE);
image = image.rotate(baton->rotationAngle, VImage::option()->set("background", background));
image = image.rotate(baton->rotationAngle, VImage::option()->set("background", background)).cache();
}
}