mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
don't reuse variable name
This commit is contained in:
parent
8b14ed741a
commit
1b878189d8
|
@ -1294,7 +1294,7 @@ def _save(im, fp, filename, chunk=putchunk, save_all=False):
|
||||||
|
|
||||||
# get the corresponding PNG mode
|
# get the corresponding PNG mode
|
||||||
try:
|
try:
|
||||||
rawmode, mode = _OUTMODES[mode]
|
rawmode, rawmode_depth_type = _OUTMODES[mode]
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
msg = f"cannot write mode {mode} as PNG"
|
msg = f"cannot write mode {mode} as PNG"
|
||||||
raise OSError(msg) from e
|
raise OSError(msg) from e
|
||||||
|
@ -1309,7 +1309,7 @@ def _save(im, fp, filename, chunk=putchunk, save_all=False):
|
||||||
b"IHDR",
|
b"IHDR",
|
||||||
o32(size[0]), # 0: size
|
o32(size[0]), # 0: size
|
||||||
o32(size[1]),
|
o32(size[1]),
|
||||||
mode, # 8: depth/type
|
rawmode_depth_type, # 8: depth/type
|
||||||
b"\0", # 10: compression
|
b"\0", # 10: compression
|
||||||
b"\0", # 11: filter category
|
b"\0", # 11: filter category
|
||||||
b"\0", # 12: interlace flag
|
b"\0", # 12: interlace flag
|
||||||
|
|
Loading…
Reference in New Issue
Block a user