@@ -965,6 +965,7 @@ class PipelineWorker : public Napi::AsyncWorker {
965965 ->set (" effort" , baton->webpEffort )
966966 ->set (" min_size" , baton->webpMinSize )
967967 ->set (" mixed" , baton->webpMixed )
968+ ->set (" exact" , baton->webpExact )
968969 ->set (" alpha_q" , baton->webpAlphaQuality )));
969970 baton->bufferOut = static_cast <char *>(area->data );
970971 baton->bufferOutLength = area->length ;
@@ -1176,6 +1177,7 @@ class PipelineWorker : public Napi::AsyncWorker {
11761177 ->set (" effort" , baton->webpEffort )
11771178 ->set (" min_size" , baton->webpMinSize )
11781179 ->set (" mixed" , baton->webpMixed )
1180+ ->set (" exact" , baton->webpExact )
11791181 ->set (" alpha_q" , baton->webpAlphaQuality ));
11801182 baton->formatOut = " webp" ;
11811183 } else if (baton->formatOut == " gif" || (mightMatchInput && isGif) ||
@@ -1486,6 +1488,7 @@ class PipelineWorker : public Napi::AsyncWorker {
14861488 {" preset" , vips_enum_nick (VIPS_TYPE_FOREIGN_WEBP_PRESET, baton->webpPreset )},
14871489 {" min_size" , baton->webpMinSize ? " true" : " false" },
14881490 {" mixed" , baton->webpMixed ? " true" : " false" },
1491+ {" exact" , baton->webpExact ? " true" : " false" },
14891492 {" effort" , std::to_string (baton->webpEffort )}
14901493 };
14911494 suffix = AssembleSuffixString (" .webp" , options);
@@ -1760,6 +1763,7 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
17601763 baton->webpEffort = sharp::AttrAsUint32 (options, " webpEffort" );
17611764 baton->webpMinSize = sharp::AttrAsBool (options, " webpMinSize" );
17621765 baton->webpMixed = sharp::AttrAsBool (options, " webpMixed" );
1766+ baton->webpExact = sharp::AttrAsBool (options, " webpExact" );
17631767 baton->gifBitdepth = sharp::AttrAsUint32 (options, " gifBitdepth" );
17641768 baton->gifEffort = sharp::AttrAsUint32 (options, " gifEffort" );
17651769 baton->gifDither = sharp::AttrAsDouble (options, " gifDither" );
0 commit comments