Skip to content

Commit

Permalink
Use less ambiguous variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 14, 2023
1 parent 41d7a37 commit 6291207
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PIL/IcoImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ def encode(self, bufsize):
w, h = self.im.size
for y in range(h):
for x in range(w):
l, a = self.im.getpixel((x, y))
l_channel, a_channel = self.im.getpixel((x, y))
if x % 8 == 0:
first_bitmap += b"\x00"
second_bitmap += b"\xff"
if not a:
if not a_channel:
first_bitmap[-1] ^= 1 << (7 - x % 8)
if not l:
if not l_channel:
second_bitmap[-1] ^= 1 << (7 - x % 8)
data = first_bitmap + second_bitmap
return len(data), 0, data
Expand Down

0 comments on commit 6291207

Please sign in to comment.