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 ec40c54 commit 6a9960eCopy full SHA for 6a9960e
1 file changed
src/PIL/Image.py
@@ -897,7 +897,9 @@ def load(self) -> core.PixelAccess | None:
897
else:
898
self.im.putpalettealphas(self.info["transparency"])
899
self.palette.mode = "RGBA"
900
- else:
+ elif self.palette.mode != mode:
901
+ # If the palette rawmode is different to the mode,
902
+ # then update the Python palette data
903
self.palette.palette = self.im.getpalette(
904
self.palette.mode, self.palette.mode
905
)
0 commit comments