Skip to content

Commit

Permalink
Loading does not change mode
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Sep 18, 2024
1 parent f1e8696 commit 84e275d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/ImageFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def load(self) -> Image.core.PixelAccess | None:

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":
Expand Down

0 comments on commit 84e275d

Please sign in to comment.