mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Fixing deprecation warning on py26
This commit is contained in:
parent
d678b97444
commit
754eb19d9d
|
@ -23,7 +23,7 @@ def _save(im, fp, filename):
|
||||||
raise IOError("cannot write mode %s as WEBP" % im.mode)
|
raise IOError("cannot write mode %s as WEBP" % im.mode)
|
||||||
quality = im.encoderinfo.get("quality", 80)
|
quality = im.encoderinfo.get("quality", 80)
|
||||||
|
|
||||||
data = _webp.WebPEncodeRGB(im.tostring(), im.size[0], im.size[1], im.size[0] * 3, float(quality))
|
data = _webp.WebPEncodeRGB(im.tobytes(), im.size[0], im.size[1], im.size[0] * 3, float(quality))
|
||||||
fp.write(data)
|
fp.write(data)
|
||||||
|
|
||||||
Image.register_open("WEBP", WebPImageFile, _accept)
|
Image.register_open("WEBP", WebPImageFile, _accept)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user