From d06a100dc36d26595bbf107aa46b6457700783f0 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 19 Jun 2024 11:49:40 +0700 Subject: [PATCH] #3837 don't use Pillow for webp somehow the images decoded seem to have 'studio' range --- tests/unittests/unit/codecs/color_range_test.py | 2 -- xpra/codecs/pillow/encoder.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/unittests/unit/codecs/color_range_test.py b/tests/unittests/unit/codecs/color_range_test.py index 03ca605a39..9ec67c3852 100755 --- a/tests/unittests/unit/codecs/color_range_test.py +++ b/tests/unittests/unit/codecs/color_range_test.py @@ -95,8 +95,6 @@ def do_test_encode_decode_range(self, "50": 4, "10": 0xc if fmt in ("webp", ) else 4, }.items(): - if enc_name == "enc_pillow" and fmt == "webp": - tolerance *= 2 # not sure why, but we don't really care is it should not be used enc_options = typedict({"quality": quality}) bdata = enc_mod.encode(fmt, image, options=enc_options) # tuple[str, Compressed, dict[str, Any], int, int, int, int] diff --git a/xpra/codecs/pillow/encoder.py b/xpra/codecs/pillow/encoder.py index 6d9916d7ce..3a8771db65 100644 --- a/xpra/codecs/pillow/encoder.py +++ b/xpra/codecs/pillow/encoder.py @@ -18,7 +18,7 @@ log = Logger("encoder", "pillow") -ENCODE_FORMATS = os.environ.get("XPRA_PILLOW_ENCODE_FORMATS", "png,png/L,png/P,jpeg,webp").split(",") +ENCODE_FORMATS = os.environ.get("XPRA_PILLOW_ENCODE_FORMATS", "png,png/L,png/P,jpeg").split(",") Image.init()