Skip to content

Commit

Permalink
Merge pull request #405 from d-schmidt/master
Browse files Browse the repository at this point in the history
don't create a new palette on Image._new if one already exists
  • Loading branch information
wiredfool committed Nov 12, 2013
2 parents ac25dab + 06301c9 commit 5f7ce44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def _new(self, im):
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:
Expand Down

0 comments on commit 5f7ce44

Please sign in to comment.