@@ -767,18 +767,20 @@ def tobytes(self, encoder_name: str = "raw", *args: Any) -> bytes:
767
767
768
768
.. warning::
769
769
770
- This method returns the raw image data from the internal
771
- storage. For compressed image data (e.g. PNG, JPEG) use
772
- :meth:`~.save`, with a BytesIO parameter for in-memory
773
- data.
774
-
775
- :param encoder_name: What encoder to use. The default is to
776
- use the standard "raw" encoder.
777
-
778
- A list of C encoders can be seen under
779
- codecs section of the function array in
780
- :file:`_imaging.c`. Python encoders are
781
- registered within the relevant plugins.
770
+ This method returns raw image data derived from Pillow's internal
771
+ storage. For compressed image data (e.g. PNG, JPEG) use
772
+ :meth:`~.save`, with a BytesIO parameter for in-memory data.
773
+
774
+ :param encoder_name: What encoder to use.
775
+
776
+ The default is to use the standard "raw" encoder.
777
+ To see how this packs pixel data into the returned
778
+ bytes, see :file:`libImaging/Pack.c`.
779
+
780
+ A list of C encoders can be seen under codecs
781
+ section of the function array in
782
+ :file:`_imaging.c`. Python encoders are registered
783
+ within the relevant plugins.
782
784
:param args: Extra arguments to the encoder.
783
785
:returns: A :py:class:`bytes` object.
784
786
"""
0 commit comments