diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index c9db3aee730..f80bc9c10a9 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -213,6 +213,10 @@ def check(self, mode, expected_color=None): def test_basic(self, mode): self.check(mode) + def test_list(self): + im = hopper() + assert im.getpixel([0, 0]) == (20, 20, 70) + @pytest.mark.parametrize("mode", ("I;16", "I;16B")) @pytest.mark.parametrize( "expected_color", (2**15 - 1, 2**15, 2**15 + 1, 2**16 - 1) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 476ed012278..6ea711b565a 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1565,7 +1565,7 @@ def getpixel(self, xy): self.load() if self.pyaccess: return self.pyaccess.getpixel(xy) - return self.im.getpixel(xy) + return self.im.getpixel(tuple(xy)) def getprojection(self): """