diff --git a/docs/changelog.md b/docs/changelog.md index d1455744..3cc2fa96 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -16,6 +16,9 @@ Requires libvips v8.14.2 [#3674](https://github.com/lovell/sharp/pull/3674) [@bianjunjie1981](https://github.com/bianjunjie1981) +* Guard use of smartcrop premultiplied option to prevent warning (regression in 0.32.1). + [#3710](https://github.com/lovell/sharp/issues/3710) + * Prevent over-compute in affine-based rotate before resize. [#3722](https://github.com/lovell/sharp/issues/3722) diff --git a/src/pipeline.cc b/src/pipeline.cc index 73d2b5af..30cea840 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -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;