mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Image.merge: Rename loop variable for clarity and type-safety.
This commit is contained in:
parent
c7136f7ff8
commit
ab6c60da1c
|
@ -2641,10 +2641,10 @@ def merge(mode, bands):
|
|||
|
||||
if getmodebands(mode) != len(bands) or "*" in mode:
|
||||
raise ValueError("wrong number of bands")
|
||||
for im in bands[1:]:
|
||||
if im.mode != getmodetype(mode):
|
||||
for band in bands[1:]:
|
||||
if band.mode != getmodetype(mode):
|
||||
raise ValueError("mode mismatch")
|
||||
if im.size != bands[0].size:
|
||||
if band.size != bands[0].size:
|
||||
raise ValueError("size mismatch")
|
||||
for band in bands:
|
||||
band.load()
|
||||
|
|
Loading…
Reference in New Issue
Block a user