Skip to content

Commit

Permalink
Merge pull request #1636 from wiredfool/docs-3.1
Browse files Browse the repository at this point in the history
Replacing fromstring with frombytes
  • Loading branch information
wiredfool committed Jan 4, 2016
2 parents 60cf27f + b56e1f7 commit a72000c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/handbook/writing-your-own-file-decoder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ The raw decoder
The ``raw`` decoder is used to read uncompressed data from an image file. It
can be used with most uncompressed file formats, such as PPM, BMP, uncompressed
TIFF, and many others. To use the raw decoder with the
:py:func:`PIL.Image.fromstring` function, use the following syntax::
:py:func:`PIL.Image.frombytes` function, use the following syntax::

image = Image.fromstring(
image = Image.frombytes(
mode, size, data, "raw",
raw mode, stride, orientation
)
Expand Down Expand Up @@ -233,9 +233,9 @@ If the raw decoder cannot handle your format, PIL also provides a special “bit
decoder that can be used to read various packed formats into a floating point
image memory.

To use the bit decoder with the fromstring function, use the following syntax::
To use the bit decoder with the frombytes function, use the following syntax::

image = fromstring(
image = frombytes(
mode, size, data, "bit",
bits, pad, fill, sign, orientation
)
Expand Down

0 comments on commit a72000c

Please sign in to comment.