mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-01-11 19:21:18 +03:00
Only update Python palette if rawmode was different to the mode
This commit is contained in:
parent
ec40c546d7
commit
6a9960e8c1
|
|
@ -897,7 +897,9 @@ class Image:
|
|||
else:
|
||||
self.im.putpalettealphas(self.info["transparency"])
|
||||
self.palette.mode = "RGBA"
|
||||
else:
|
||||
elif self.palette.mode != mode:
|
||||
# If the palette rawmode is different to the mode,
|
||||
# then update the Python palette data
|
||||
self.palette.palette = self.im.getpalette(
|
||||
self.palette.mode, self.palette.mode
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user