Make images smaller using best-in-class codecs, right in the browser.
JavaScript
Allow non-0 quality in webp (#876)
Jake Archibald7699f75b45d7
diff --git a/codecs/webp/enc/webp_enc.cpp b/codecs/webp/enc/webp_enc.cppindex d42ad549..d64ea415 100644--- a/codecs/webp/enc/webp_enc.cpp+++ b/codecs/webp/enc/webp_enc.cpp@@ -26,6 +26,9 @@ val encode(std::string img, int width, int height, WebPConfig config) {return val::null();}+ // Allow quality to go higher than 0.+ config.qmax = 100;+// Only use use_argb if we really need it, as it's slower.pic.use_argb = config.lossless || config.use_sharp_yuv || config.preprocessing > 0;pic.width = width;diff --git a/codecs/webp/enc/webp_enc.wasm b/codecs/webp/enc/webp_enc.wasmindex 3b4df28e..c1b08f13 100755Binary files a/codecs/webp/enc/webp_enc.wasm and b/codecs/webp/enc/webp_enc.wasm differdiff --git a/codecs/webp/enc/webp_enc_simd.wasm b/codecs/webp/enc/webp_enc_simd.wasmold mode 100644new mode 100755index f4ddd018..9862aaa4Binary files a/codecs/webp/enc/webp_enc_simd.wasm and b/codecs/webp/enc/webp_enc_simd.wasm differ