We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1e8696 commit 84e275dCopy full SHA for 84e275d
src/PIL/ImageFile.py
@@ -322,7 +322,7 @@ def load(self) -> Image.core.PixelAccess | None:
322
323
def load_prepare(self) -> None:
324
# create image memory if necessary
325
- if self._im is None or self.im.mode != self.mode:
+ if self._im is None:
326
self.im = Image.core.new(self.mode, self.size)
327
# create palette (optional)
328
if self.mode == "P":
0 commit comments