From 629120789218db715327e09e6098c9d6132ba934 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 14 Nov 2023 22:19:31 +1100 Subject: [PATCH] Use less ambiguous variable names --- src/PIL/IcoImagePlugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PIL/IcoImagePlugin.py b/src/PIL/IcoImagePlugin.py index 4d0880206..0e094de7d 100644 --- a/src/PIL/IcoImagePlugin.py +++ b/src/PIL/IcoImagePlugin.py @@ -396,13 +396,13 @@ class Ico1Encoder(ImageFile.PyEncoder): 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