From 38df9bef09f407ab0ec75d254d233e7b0287f6d2 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 6 May 2019 08:38:43 +1000 Subject: [PATCH 1/3] Added import [ci skip] --- docs/handbook/tutorial.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From f9f235ac2ee8eac3f5a4d0de25f223ed2f208371 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 6 May 2019 08:40:32 +1000 Subject: [PATCH 2/3] Corrected use of function [ci skip] --- docs/handbook/writing-your-own-file-decoder.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ) From 110dd6236f01e4513410bc8158d1113e72f6e95f Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 8 May 2019 12:54:12 +1000 Subject: [PATCH 3/3] Highlight function [ci skip] --- docs/reference/ImageMath.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 --------------------------------------------------