mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 00:04:09 +03:00
don't create a new palette on Image._new if one already exists (i.e. after im.copy())
This commit is contained in:
parent
ac25dab915
commit
06301c9eba
|
@ -475,7 +475,7 @@ class Image:
|
|||
new.mode = im.mode
|
||||
new.size = im.size
|
||||
new.palette = self.palette
|
||||
if im.mode == "P":
|
||||
if im.mode == "P" and not new.palette:
|
||||
from PIL import ImagePalette
|
||||
new.palette = ImagePalette.ImagePalette()
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user