Skip to content

Commit

Permalink
#3337 use fast method value for webp
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 21, 2021
1 parent eb385f7 commit c438f61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xpra/codecs/pillow/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c438f61

Please sign in to comment.