mirror of
https://github.com/lovell/sharp.git
synced 2026-02-12 17:46:13 +01:00
Expose optional precision parameter of blur operation (#4168)
This commit is contained in:
committed by
GitHub
parent
10c6f474d9
commit
67a4592756
@@ -592,7 +592,7 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
|
||||
// Blur
|
||||
if (shouldBlur) {
|
||||
image = sharp::Blur(image, baton->blurSigma);
|
||||
image = sharp::Blur(image, baton->blurSigma, baton->precision);
|
||||
}
|
||||
|
||||
// Unflatten the image
|
||||
@@ -1541,6 +1541,7 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
|
||||
baton->negate = sharp::AttrAsBool(options, "negate");
|
||||
baton->negateAlpha = sharp::AttrAsBool(options, "negateAlpha");
|
||||
baton->blurSigma = sharp::AttrAsDouble(options, "blurSigma");
|
||||
baton->precision = sharp::AttrAsEnum<VipsPrecision>(options, "precision", VIPS_TYPE_PRECISION);
|
||||
baton->brightness = sharp::AttrAsDouble(options, "brightness");
|
||||
baton->saturation = sharp::AttrAsDouble(options, "saturation");
|
||||
baton->hue = sharp::AttrAsInt32(options, "hue");
|
||||
|
||||
Reference in New Issue
Block a user