mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-09-24 04:56:57 +03:00
Merge 3a580e0f79
into 4aef5d0743
This commit is contained in:
commit
0ae3d64f15
|
@ -2070,9 +2070,7 @@ class Image:
|
|||
:param value: The pixel value.
|
||||
"""
|
||||
|
||||
if self.readonly:
|
||||
self._copy()
|
||||
self.load()
|
||||
self._ensure_mutable()
|
||||
|
||||
if (
|
||||
self.mode in ("P", "PA")
|
||||
|
|
|
@ -76,9 +76,7 @@ class ImageDraw:
|
|||
must be the same as the image mode. If omitted, the mode
|
||||
defaults to the mode of the image.
|
||||
"""
|
||||
im.load()
|
||||
if im.readonly:
|
||||
im._copy() # make it writeable
|
||||
im._ensure_mutable()
|
||||
blend = 0
|
||||
if mode is None:
|
||||
mode = im.mode
|
||||
|
|
Loading…
Reference in New Issue
Block a user