mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 01:13:34 +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)
|
used_palette_colors = _get_optimize(im, im.encoderinfo)
|
||||||
if used_palette_colors is not None:
|
if used_palette_colors is not None:
|
||||||
# adjust the transparency index after optimize
|
# adjust the transparency index after optimize
|
||||||
for i in range(len(used_palette_colors)):
|
for i, palette_color in enumerate(used_palette_colors):
|
||||||
if used_palette_colors[i] == transparency:
|
if palette_color == transparency:
|
||||||
transparency = i
|
transparency = i
|
||||||
transparent_color_exists = True
|
transparent_color_exists = True
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue
Block a user