From 566b16020abb0bd6092d67dddad7579d432c5d0a Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 23 Apr 2015 01:06:32 -0700 Subject: [PATCH] Restore negative seeks for TIFF. --- PIL/TiffImagePlugin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index 3b7c1d92d..8bba4e207 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -652,9 +652,7 @@ class TiffImageFile(ImageFile.ImageFile): def seek(self, frame): "Select a given frame as current image" - if frame < 0: - raise ValueError("invalid seek") - self._seek(frame) + self._seek(max(frame, 0)) # Questionable backwards compatibility. # Create a new core image object on second and # subsequent frames in the image. Image may be # different size/mode.