Skip to content

Commit ca69e72

Browse files
committed
Use _ensure_mutable
1 parent b7e0570 commit ca69e72

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/PIL/ImageDraw.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ def __init__(self, im: Image.Image, mode: str | None = None) -> None:
7676
must be the same as the image mode. If omitted, the mode
7777
defaults to the mode of the image.
7878
"""
79-
im.load()
80-
if im.readonly:
81-
im._copy() # make it writeable
79+
im._ensure_mutable()
8280
blend = 0
8381
if mode is None:
8482
mode = im.mode

0 commit comments

Comments
 (0)