mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
When unpickling, only put palette if there is one
This commit is contained in:
parent
7823197fdd
commit
0f89322216
|
@ -625,7 +625,7 @@ class Image:
|
|||
self.mode = mode
|
||||
self.size = size
|
||||
self.im = core.new(mode, size)
|
||||
if mode in ("L", "P"):
|
||||
if mode in ("L", "P") and palette:
|
||||
self.putpalette(palette)
|
||||
self.frombytes(data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user