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:
wiredfool 2013-11-12 11:19:49 -08:00
commit 5f7ce4468a

View File

@ -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: