Returns the pixel value at a given position. :param xy: The coordinate, given as (x, y). See :ref:`coordinate-system`. :returns: The pixel value. If the image is a multi-layer image, this method returns a tuple.
(
self, xy: tuple[int, int] | list[int]
)
| 1750 | del self.info["transparency"] |
| 1751 | |
| 1752 | def getpixel( |
| 1753 | self, xy: tuple[int, int] | list[int] |
| 1754 | ) -> float | tuple[int, ...] | None: |
| 1755 | """ |
| 1756 | Returns the pixel value at a given position. |
| 1757 | |
| 1758 | :param xy: The coordinate, given as (x, y). See |
| 1759 | :ref:`coordinate-system`. |
| 1760 | :returns: The pixel value. If the image is a multi-layer image, |
| 1761 | this method returns a tuple. |
| 1762 | """ |
| 1763 | |
| 1764 | self.load() |
| 1765 | return self.im.getpixel(tuple(xy)) |
| 1766 | |
| 1767 | def getprojection(self) -> tuple[list[int], list[int]]: |
| 1768 | """ |