Guard use of smartcrop premultiplied option #3710

This commit is contained in:
Lovell Fuller
2023-07-09 09:57:20 +01:00
parent 2f67823c3d
commit 3434eef5b9
2 changed files with 5 additions and 0 deletions

View File

@@ -477,7 +477,9 @@ class PipelineWorker : public Napi::AsyncWorker {
image = image.smartcrop(baton->width, baton->height, VImage::option()
->set("interesting", baton->position == 16 ? VIPS_INTERESTING_ENTROPY : VIPS_INTERESTING_ATTENTION)
#if (VIPS_MAJOR_VERSION >= 8 && VIPS_MINOR_VERSION >= 15)
->set("premultiplied", shouldPremultiplyAlpha)
#endif
->set("attention_x", &attention_x)
->set("attention_y", &attention_y));
baton->hasCropOffset = true;