mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	Improved load truncated images
This commit is contained in:
		
							parent
							
								
									ee04c7ceea
								
							
						
					
					
						commit
						33bf5d9d37
					
				|  | @ -226,9 +226,8 @@ class ImageFile(Image.Image): | |||
| 
 | ||||
|         self.fp = None # might be shared | ||||
| 
 | ||||
|         if not LOAD_TRUNCATED_IMAGES and not self.map and e < 0: | ||||
|             # Note: If loading a truncated image results in an all black Image, | ||||
|             # the decoder wasn't able to decode anything. | ||||
|         if (t == 0 or not LOAD_TRUNCATED_IMAGES) and not self.map and e < 0: | ||||
|             # still raised if decoder fails to return anything | ||||
|             raise_ioerror(e) | ||||
| 
 | ||||
|         # post processing | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user