read_info_from_image: don't mutate info in passed-in image
This commit is contained in:
parent
96f0593c8f
commit
5c6a33b3e1
|
@ -672,7 +672,7 @@ IGNORED_INFO_KEYS = {
|
||||||
|
|
||||||
|
|
||||||
def read_info_from_image(image: Image.Image) -> tuple[str | None, dict]:
|
def read_info_from_image(image: Image.Image) -> tuple[str | None, dict]:
|
||||||
items = image.info or {}
|
items = (image.info or {}).copy()
|
||||||
|
|
||||||
geninfo = items.pop('parameters', None)
|
geninfo = items.pop('parameters', None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue