mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-29 14:34:13 +03:00
Apply suggestions from code review
Co-authored-by: Ondrej Baranovič <3819630+nulano@users.noreply.github.com> Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
46708099b1
commit
2db9c68571
|
@ -634,8 +634,7 @@ class Image:
|
||||||
)
|
)
|
||||||
|
|
||||||
def _repr_image(self, image_format):
|
def _repr_image(self, image_format):
|
||||||
"""iPython display hook support
|
"""Helper function for iPython display hook
|
||||||
|
|
||||||
:param image_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.
|
||||||
"""
|
"""
|
||||||
|
@ -657,7 +656,7 @@ class Image:
|
||||||
def _repr_jpeg_(self):
|
def _repr_jpeg_(self):
|
||||||
"""iPython display hook support for JPEG format.
|
"""iPython display hook support for JPEG format.
|
||||||
|
|
||||||
:returns: jpg version of the image as bytes
|
:returns: jpeg version of the image as bytes
|
||||||
"""
|
"""
|
||||||
return self._repr_image("JPEG")
|
return self._repr_image("JPEG")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user