Use copy rather than cache to prevent affine overcompute

More predictable behaviour, see commit 14c3346 for context
This commit is contained in:
Lovell Fuller
2023-07-10 13:36:26 +01:00
parent 5522060e9e
commit 9c547dc321
2 changed files with 2 additions and 2 deletions

View File

@@ -119,7 +119,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)).cache();
image = image.rotate(baton->rotationAngle, VImage::option()->set("background", background)).copy_memory();
}
}