Skip to content

Commit

Permalink
accept empty options
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Dec 4, 2021
1 parent 76ae51d commit fc7ff86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xpra/codecs/pillow/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ def get_info() -> dict:
}


def encode(coding : str, image, options):
def encode(coding : str, image, options=None):
assert coding in ("jpeg", "webp", "png", "png/P", "png/L"), "unsupported encoding: %s" % coding
log("pillow.encode%s", (coding, image, options))
options = options or {}
quality = options.get("quality", 50)
speed = options.get("speed", 50)
supports_transparency = options.get("alpha", True)
Expand Down

0 comments on commit fc7ff86

Please sign in to comment.