mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-27 12:33:41 +03:00
commit
b7501aa3c0
|
@ -647,7 +647,14 @@ class Image(object):
|
||||||
|
|
||||||
def tobytes(self, encoder_name="raw", *args):
|
def tobytes(self, encoder_name="raw", *args):
|
||||||
"""
|
"""
|
||||||
Return image as a bytes object
|
Return image as a bytes object.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This method returns the raw image data from the internal
|
||||||
|
storage. For compressed image data (e.g. PNG, JPEG) use
|
||||||
|
:meth:`~.save`, with a BytesIO parameter for in-memory
|
||||||
|
data.
|
||||||
|
|
||||||
:param encoder_name: What encoder to use. The default is to
|
:param encoder_name: What encoder to use. The default is to
|
||||||
use the standard "raw" encoder.
|
use the standard "raw" encoder.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user