Merge pull request #5450 from radarhere/webp_method

Changed WebP default "method" value to 4
This commit is contained in:
Hugo van Kemenade 2021-04-29 14:17:05 +03:00 committed by GitHub
commit b3bb58746c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -940,7 +940,7 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
files compared to the slowest, but best, 100.
**method**
Quality/speed trade-off (0=fast, 6=slower-better). Defaults to 0.
Quality/speed trade-off (0=fast, 6=slower-better). Defaults to 4.
**icc_profile**
The ICC Profile to include in the saved file. Only supported if

View File

@ -314,7 +314,7 @@ def _save(im, fp, filename):
if isinstance(exif, Image.Exif):
exif = exif.tobytes()
xmp = im.encoderinfo.get("xmp", "")
method = im.encoderinfo.get("method", 0)
method = im.encoderinfo.get("method", 4)
if im.mode not in _VALID_WEBP_LEGACY_MODES:
alpha = (