mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	ensure that the prevous frame was loaded when seek()ing
This commit is contained in:
		
							parent
							
								
									047832c6c6
								
							
						
					
					
						commit
						925277cbfc
					
				|  | @ -101,6 +101,10 @@ class GifImageFile(ImageFile.ImageFile): | |||
|             self.__fp.seek(self.__rewind) | ||||
|             self._prev_im = None | ||||
|             self.disposal_method = 0 | ||||
|         else: | ||||
|             # ensure that the previous frame was loaded | ||||
|             if not self.im: | ||||
|                 self.load() | ||||
| 
 | ||||
|         if frame != self.__frame + 1: | ||||
|             raise ValueError("cannot seek to frame %d" % frame) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user