mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Replaced range(len()) with enumerate
This commit is contained in:
parent
a51dc7dcaf
commit
2ba2763f0b
|
@ -437,8 +437,8 @@ def _get_local_header(fp, im, offset, flags):
|
|||
used_palette_colors = _get_optimize(im, im.encoderinfo)
|
||||
if used_palette_colors is not None:
|
||||
# adjust the transparency index after optimize
|
||||
for i in range(len(used_palette_colors)):
|
||||
if used_palette_colors[i] == transparency:
|
||||
for i, palette_color in enumerate(used_palette_colors):
|
||||
if palette_color == transparency:
|
||||
transparency = i
|
||||
transparent_color_exists = True
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue
Block a user