mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 18:03:07 +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
|
"""iPython display hook support
|
||||||
|
|
||||||
:param format: Image format.
|
:param image_format: Image format.
|
||||||
:returns: image as bytes, saved into the given format.
|
:returns: image as bytes, saved into the given format.
|
||||||
"""
|
"""
|
||||||
b = io.BytesIO()
|
b = io.BytesIO()
|
||||||
try:
|
try:
|
||||||
self.save(b, format)
|
self.save(b, image_format)
|
||||||
except Exception as e:
|
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
|
raise ValueError(msg) from e
|
||||||
return b.getvalue()
|
return b.getvalue()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user