mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
legacy getheader mutates the image
This commit is contained in:
parent
872bce552f
commit
aea2a4ca8d
|
@ -695,7 +695,9 @@ def getheader(im, palette=None, info=[]):
|
|||
if not "background" in info and "background" in im.info:
|
||||
info["background"] = im.info["background"]
|
||||
|
||||
im = _normalize_palette(im, palette, info)
|
||||
im_mod = _normalize_palette(im, palette, info)
|
||||
im.palette = im_mod.palette
|
||||
im.im = im_mod.im
|
||||
header = _get_global_header(im, info)
|
||||
|
||||
return header, used_palette_colors
|
||||
|
|
Loading…
Reference in New Issue
Block a user