mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	Improved get_format_mimetype logic
This commit is contained in:
		
							parent
							
								
									7447b44edf
								
							
						
					
					
						commit
						4c0e32ccf2
					
				|  | @ -120,9 +120,10 @@ class ImageFile(Image.Image): | ||||||
|         pass |         pass | ||||||
| 
 | 
 | ||||||
|     def get_format_mimetype(self): |     def get_format_mimetype(self): | ||||||
|         if self.format is None: |         if self.custom_mimetype: | ||||||
|             return |             return self.custom_mimetype | ||||||
|         return self.custom_mimetype or Image.MIME.get(self.format.upper()) |         if self.format is not None: | ||||||
|  |             return Image.MIME.get(self.format.upper()) | ||||||
| 
 | 
 | ||||||
|     def verify(self): |     def verify(self): | ||||||
|         "Check file integrity" |         "Check file integrity" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user