mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	rename format to image_format
This commit is contained in:
		
							parent
							
								
									55be23bbd2
								
							
						
					
					
						commit
						ccdce1791d
					
				|  | @ -633,17 +633,17 @@ class Image: | |||
|             ) | ||||
|         ) | ||||
| 
 | ||||
|     def _repr_image(self, format): | ||||
|     def _repr_image(self, image_format): | ||||
|         """iPython display hook support | ||||
| 
 | ||||
|         :param format: Image format. | ||||
|         :param image_format: Image format. | ||||
|         :returns: image as bytes, saved into the given format. | ||||
|         """ | ||||
|         b = io.BytesIO() | ||||
|         try: | ||||
|             self.save(b, format) | ||||
|             self.save(b, image_format) | ||||
|         except Exception as e: | ||||
|             msg = f"Could not save to {format} for display" | ||||
|             msg = f"Could not save to {image_format} for display" | ||||
|             raise ValueError(msg) from e | ||||
|         return b.getvalue() | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user