mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Merge pull request #7355 from radarhere/getpixel
This commit is contained in:
commit
a25127034b
|
@ -213,6 +213,10 @@ class TestImageGetPixel(AccessTest):
|
||||||
def test_basic(self, mode):
|
def test_basic(self, mode):
|
||||||
self.check(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("mode", ("I;16", "I;16B"))
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"expected_color", (2**15 - 1, 2**15, 2**15 + 1, 2**16 - 1)
|
"expected_color", (2**15 - 1, 2**15, 2**15 + 1, 2**16 - 1)
|
||||||
|
|
|
@ -1565,7 +1565,7 @@ class Image:
|
||||||
self.load()
|
self.load()
|
||||||
if self.pyaccess:
|
if self.pyaccess:
|
||||||
return self.pyaccess.getpixel(xy)
|
return self.pyaccess.getpixel(xy)
|
||||||
return self.im.getpixel(xy)
|
return self.im.getpixel(tuple(xy))
|
||||||
|
|
||||||
def getprojection(self):
|
def getprojection(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user