mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-15 18:52:19 +03:00
one code style for all methods
This commit is contained in:
parent
3fa3b48ae9
commit
f680b5417b
|
@ -995,8 +995,7 @@ class Image(object):
|
||||||
im = self.im.convert("P", 1, palette.im)
|
im = self.im.convert("P", 1, palette.im)
|
||||||
return self._makeself(im)
|
return self._makeself(im)
|
||||||
|
|
||||||
im = self.im.quantize(colors, method, kmeans)
|
return self._new(self.im.quantize(colors, method, kmeans))
|
||||||
return self._new(im)
|
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
"""
|
"""
|
||||||
|
@ -1007,8 +1006,7 @@ class Image(object):
|
||||||
:returns: An :py:class:`~PIL.Image.Image` object.
|
:returns: An :py:class:`~PIL.Image.Image` object.
|
||||||
"""
|
"""
|
||||||
self.load()
|
self.load()
|
||||||
im = self.im.copy()
|
return self._new(self.im.copy())
|
||||||
return self._new(im)
|
|
||||||
|
|
||||||
__copy__ = copy
|
__copy__ = copy
|
||||||
|
|
||||||
|
@ -1935,8 +1933,7 @@ class Image(object):
|
||||||
:param distance: Distance to spread pixels.
|
:param distance: Distance to spread pixels.
|
||||||
"""
|
"""
|
||||||
self.load()
|
self.load()
|
||||||
im = self.im.effect_spread(distance)
|
return self._new(self.im.effect_spread(distance))
|
||||||
return self._new(im)
|
|
||||||
|
|
||||||
def toqimage(self):
|
def toqimage(self):
|
||||||
"""Returns a QImage copy of this image"""
|
"""Returns a QImage copy of this image"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user