mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 08:14:10 +03:00
Merge pull request #405 from d-schmidt/master
don't create a new palette on Image._new if one already exists
This commit is contained in:
commit
5f7ce4468a
|
@ -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