mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Merge pull request #3684 from fchapoton/patch-1
Use the already imported io
This commit is contained in:
commit
30965818af
|
@ -679,8 +679,7 @@ class Image(object):
|
|||
|
||||
:returns: png version of the image as bytes
|
||||
"""
|
||||
from io import BytesIO
|
||||
b = BytesIO()
|
||||
b = io.BytesIO()
|
||||
self.save(b, 'PNG')
|
||||
return b.getvalue()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user