mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
Simplified code
This commit is contained in:
parent
fdf074b050
commit
96a4d98abc
|
@ -318,7 +318,7 @@ def _save(im, fp, filename):
|
||||||
exif = exif[6:]
|
exif = exif[6:]
|
||||||
xmp = im.encoderinfo.get("xmp", "")
|
xmp = im.encoderinfo.get("xmp", "")
|
||||||
method = im.encoderinfo.get("method", 4)
|
method = im.encoderinfo.get("method", 4)
|
||||||
exact = im.encoderinfo.get("exact", False)
|
exact = 1 if im.encoderinfo.get("exact") else 0
|
||||||
|
|
||||||
if im.mode not in _VALID_WEBP_LEGACY_MODES:
|
if im.mode not in _VALID_WEBP_LEGACY_MODES:
|
||||||
alpha = (
|
alpha = (
|
||||||
|
@ -337,7 +337,7 @@ def _save(im, fp, filename):
|
||||||
im.mode,
|
im.mode,
|
||||||
icc_profile,
|
icc_profile,
|
||||||
method,
|
method,
|
||||||
1 if exact else 0,
|
exact,
|
||||||
exif,
|
exif,
|
||||||
xmp,
|
xmp,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user