From 424a09ecadadbf1320e0041a0cd8295f8711a076 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 6 May 2017 23:20:34 +1000 Subject: [PATCH] Updated references to point to existing files [ci skip] --- CHANGES.rst | 2 +- docs/handbook/tutorial.rst | 16 ++++++++-------- docs/reference/ImageDraw.rst | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index dcbff8be1..2c68769c6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2529,7 +2529,7 @@ Pre-fork import numpy, Image - im = Image.open('lena.jpg') + im = Image.open('hopper.jpg') a = numpy.asarray(im) # a is readonly diff --git a/docs/handbook/tutorial.rst b/docs/handbook/tutorial.rst index 6b4add945..245d4fc2c 100644 --- a/docs/handbook/tutorial.rst +++ b/docs/handbook/tutorial.rst @@ -13,7 +13,7 @@ To load an image from a file, use the :py:func:`~PIL.Image.open` function in the :py:mod:`~PIL.Image` module:: >>> from PIL import Image - >>> im = Image.open("lena.ppm") + >>> im = Image.open("hopper.ppm") If successful, this function returns an :py:class:`~PIL.Image.Image` object. You can now use instance attributes to examine the file contents:: @@ -276,7 +276,7 @@ Converting between modes :: - im = Image.open("lena.ppm").convert("L") + im = Image.open("hopper.ppm").convert("L") The library supports transformations between each supported mode and the “L” and “RGB” modes. To convert between other modes, you may have to use an @@ -435,8 +435,8 @@ Drawing Postscript from PIL import Image from PIL import PSDraw - im = Image.open("lena.ppm") - title = "lena" + im = Image.open("hopper.ppm") + title = "hopper" box = (1*72, 2*72, 7*72, 10*72) # in points ps = PSDraw.PSDraw() # default is sys.stdout @@ -459,7 +459,7 @@ As described earlier, the :py:func:`~PIL.Image.open` function of the :py:mod:`~PIL.Image` module is used to open an image file. In most cases, you simply pass it the filename as an argument:: - im = Image.open("lena.ppm") + im = Image.open("hopper.ppm") If everything goes well, the result is an :py:class:`PIL.Image.Image` object. Otherwise, an :exc:`IOError` exception is raised. @@ -473,7 +473,7 @@ Reading from an open file :: - fp = open("lena.ppm", "rb") + fp = open("hopper.ppm", "rb") im = Image.open(fp) To read an image from string data, use the :py:class:`~StringIO.StringIO` @@ -499,9 +499,9 @@ Reading from a tar archive :: - from PIL import TarIO + from PIL import Image, TarIO - fp = TarIO.TarIO("Imaging.tar", "Imaging/test/lena.ppm") + fp = TarIO.TarIO("Tests/images/hopper.tar", "hopper.jpg") im = Image.open(fp) Controlling the decoder diff --git a/docs/reference/ImageDraw.rst b/docs/reference/ImageDraw.rst index 842407c90..3f1bb7b8d 100644 --- a/docs/reference/ImageDraw.rst +++ b/docs/reference/ImageDraw.rst @@ -20,7 +20,7 @@ Example: Draw a gray cross over an image from PIL import Image, ImageDraw - im = Image.open("lena.pgm") + im = Image.open("hopper.jpg") draw = ImageDraw.Draw(im) draw.line((0, 0) + im.size, fill=128) @@ -81,7 +81,7 @@ Example: Draw Partial Opacity Text from PIL import Image, ImageDraw, ImageFont # get an image - base = Image.open('Pillow/Tests/images/lena.png').convert('RGBA') + base = Image.open('Pillow/Tests/images/hopper.png').convert('RGBA') # make a blank image for the text, initialized to transparent text color txt = Image.new('RGBA', base.size, (255,255,255,0))