Merge pull request #3722 from radarhere/seek_docs

Corrected seek documentation
This commit is contained in:
Hugo 2019-03-16 15:55:29 +02:00 committed by GitHub
commit d1f865e02a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 9 deletions

View File

@ -105,8 +105,8 @@ Reading sequences
~~~~~~~~~~~~~~~~~
The GIF loader supports the :py:meth:`~file.seek` and :py:meth:`~file.tell`
methods. You can seek to the next frame (``im.seek(im.tell() + 1)``), or rewind
the file by seeking to the first frame. Random access is not supported.
methods. You can combine these methods to seek to the next frame
(``im.seek(im.tell() + 1)``).
``im.seek()`` raises an ``EOFError`` if you try to seek after the last frame.

View File

@ -396,10 +396,6 @@ Reading sequences
As seen in this example, youll get an :py:exc:`EOFError` exception when the
sequence ends.
Note that most drivers in the current version of the library only allow you to
seek to the next frame (as in the above example). To rewind the file, you may
have to reopen it.
The following class lets you use the for-statement to loop over the sequence:
Using the ImageSequence Iterator class

View File

@ -2005,9 +2005,6 @@ class Image(object):
**EOFError** exception. When a sequence file is opened, the
library automatically seeks to frame 0.
Note that in the current version of the library, most sequence
formats only allow you to seek to the next frame.
See :py:meth:`~PIL.Image.Image.tell`.
:param frame: Frame number, starting at 0.