diff --git a/docs/handbook/tutorial.rst b/docs/handbook/tutorial.rst index b05972f93..a0868a89c 100644 --- a/docs/handbook/tutorial.rst +++ b/docs/handbook/tutorial.rst @@ -473,8 +473,8 @@ Reading from a string :: + from PIL import Image import StringIO - im = Image.open(StringIO.StringIO(buffer)) Note that the library rewinds the file (using ``seek(0)``) before reading the diff --git a/docs/handbook/writing-your-own-file-decoder.rst b/docs/handbook/writing-your-own-file-decoder.rst index 2e68656ca..f3f34e30d 100644 --- a/docs/handbook/writing-your-own-file-decoder.rst +++ b/docs/handbook/writing-your-own-file-decoder.rst @@ -255,9 +255,10 @@ 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 frombytes function, use the following syntax:: +To use the bit decoder with the :py:func:`PIL.Image.frombytes` function, use +the following syntax:: - image = frombytes( + image = Image.frombytes( mode, size, data, "bit", bits, pad, fill, sign, orientation ) diff --git a/docs/reference/ImageMath.rst b/docs/reference/ImageMath.rst index 445a7e277..ca30244d1 100644 --- a/docs/reference/ImageMath.rst +++ b/docs/reference/ImageMath.rst @@ -5,8 +5,8 @@ ========================== The :py:mod:`ImageMath` module can be used to evaluate “image expressions”. The -module provides a single eval function, which takes an expression string and -one or more images. +module provides a single :py:meth:`~PIL.ImageMath.eval` function, which takes +an expression string and one or more images. Example: Using the :py:mod:`~PIL.ImageMath` module --------------------------------------------------