Change to io module

This commit is contained in:
jiaozhh 2016-11-12 19:36:30 +08:00
parent 76d156bef0
commit fe1cf8e9c1

View File

@ -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
image header. In addition, seek will also be used when the image data is read