mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-17 10:44:45 +03:00
Change to io module
This commit is contained in:
parent
76d156bef0
commit
fe1cf8e9c1
|
@ -484,9 +484,9 @@ Reading from a string
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
import StringIO
|
import io
|
||||||
|
|
||||||
im = Image.open(StringIO.StringIO(buffer))
|
im = Image.open(io.StringIO(buffer))
|
||||||
|
|
||||||
Note that the library rewinds the file (using ``seek(0)``) before reading the
|
Note that the library rewinds the file (using ``seek(0)``) before reading the
|
||||||
image header. In addition, seek will also be used when the image data is read
|
image header. In addition, seek will also be used when the image data is read
|
||||||
|
|
Loading…
Reference in New Issue
Block a user