mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Loading does not change mode
This commit is contained in:
parent
f1e86965f6
commit
84e275d906
|
@ -322,7 +322,7 @@ class ImageFile(Image.Image):
|
|||
|
||||
def load_prepare(self) -> None:
|
||||
# create image memory if necessary
|
||||
if self._im is None or self.im.mode != self.mode:
|
||||
if self._im is None:
|
||||
self.im = Image.core.new(self.mode, self.size)
|
||||
# create palette (optional)
|
||||
if self.mode == "P":
|
||||
|
|
Loading…
Reference in New Issue
Block a user