mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-28 10:14:30 +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
|
:returns: png version of the image as bytes
|
||||||
"""
|
"""
|
||||||
from io import BytesIO
|
b = io.BytesIO()
|
||||||
b = BytesIO()
|
|
||||||
self.save(b, 'PNG')
|
self.save(b, 'PNG')
|
||||||
return b.getvalue()
|
return b.getvalue()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user