mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Merge pull request #2248 from uploadcare/use-_new
Use Image._new() instead of _makeself()
This commit is contained in:
commit
fb54b1da2e
|
@ -530,8 +530,6 @@ class Image(object):
|
|||
new.info = self.info.copy()
|
||||
return new
|
||||
|
||||
_makeself = _new # compatibility
|
||||
|
||||
# Context Manager Support
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
@ -997,7 +995,7 @@ class Image(object):
|
|||
"only RGB or L mode images can be quantized to a palette"
|
||||
)
|
||||
im = self.im.convert("P", 1, palette.im)
|
||||
return self._makeself(im)
|
||||
return self._new(im)
|
||||
|
||||
return self._new(self.im.quantize(colors, method, kmeans))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user