mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Guard use of smartcrop premultiplied option #3710
This commit is contained in:
parent
2f67823c3d
commit
3434eef5b9
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user