From f9f367fe54c68e856a5630462f6cbad4ce49c186 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Wed, 30 Aug 2023 07:27:09 +1000 Subject: [PATCH] Always cast to a tuple Co-authored-by: Alexander Karpinsky --- src/PIL/Image.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 2b7ec6bec..6ea711b56 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1565,9 +1565,7 @@ class Image: self.load() if self.pyaccess: return self.pyaccess.getpixel(xy) - if isinstance(xy, list): - xy = tuple(xy) - return self.im.getpixel(xy) + return self.im.getpixel(tuple(xy)) def getprojection(self): """