From c438f61d6cd18c3c92142890563446ee616e94f9 Mon Sep 17 00:00:00 2001 From: totaam Date: Fri, 19 Nov 2021 22:14:53 +0700 Subject: [PATCH] #3337 use fast method value for webp --- xpra/codecs/pillow/encoder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xpra/codecs/pillow/encoder.py b/xpra/codecs/pillow/encoder.py index 219ab9def2..5ac55d314d 100644 --- a/xpra/codecs/pillow/encoder.py +++ b/xpra/codecs/pillow/encoder.py @@ -153,8 +153,10 @@ def encode(coding : str, image, quality : int, speed : int, supports_transparenc if pixel_format.find("A")>=0 and coding=="jpeg": im = im.convert("RGB") q = int(min(100, max(1, quality))) - kwargs = im.info + kwargs = dict(im.info) kwargs["quality"] = q + if coding=="webp": + kwargs["method"] = int(speed<10) client_options["quality"] = q if coding=="jpeg" and speed<50: #(optimizing jpeg is pretty cheap and worth doing)