mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-15 20:06:28 +03:00
Rename _mutable to _ensure_mutable
This commit is contained in:
parent
d8c088ed8b
commit
a491500257
|
@ -592,7 +592,7 @@ class Image(object):
|
||||||
self.pyaccess = None
|
self.pyaccess = None
|
||||||
self.readonly = 0
|
self.readonly = 0
|
||||||
|
|
||||||
def _mutable(self):
|
def _ensure_mutable(self):
|
||||||
if self.readonly:
|
if self.readonly:
|
||||||
self._copy()
|
self._copy()
|
||||||
else:
|
else:
|
||||||
|
@ -1394,7 +1394,7 @@ class Image(object):
|
||||||
im = im.convert(self.mode)
|
im = im.convert(self.mode)
|
||||||
im = im.im
|
im = im.im
|
||||||
|
|
||||||
self._mutable()
|
self._ensure_mutable()
|
||||||
|
|
||||||
if mask:
|
if mask:
|
||||||
mask.load()
|
mask.load()
|
||||||
|
@ -1500,7 +1500,7 @@ class Image(object):
|
||||||
other color value.
|
other color value.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self._mutable()
|
self._ensure_mutable()
|
||||||
|
|
||||||
if self.mode not in ("LA", "RGBA"):
|
if self.mode not in ("LA", "RGBA"):
|
||||||
# attempt to promote self to a matching alpha mode
|
# attempt to promote self to a matching alpha mode
|
||||||
|
@ -1556,7 +1556,7 @@ class Image(object):
|
||||||
:param offset: An optional offset value. The default is 0.0.
|
:param offset: An optional offset value. The default is 0.0.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self._mutable()
|
self._ensure_mutable()
|
||||||
|
|
||||||
self.im.putdata(data, scale, offset)
|
self.im.putdata(data, scale, offset)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user