From b4274ec6e3946637d5669132ad4648bad6de04bb Mon Sep 17 00:00:00 2001 From: WIPocket Date: Mon, 4 Apr 2022 11:47:09 +0200 Subject: [PATCH] Fix at --- lib.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib.py b/lib.py index 69a64ee..5a7eda7 100644 --- a/lib.py +++ b/lib.py @@ -58,10 +58,11 @@ class Picture: assert result.h == ht return result - def at(x, y): + def at(self, x, y): return self.pixels[ - int(max(0, min(self.h - 1, y))), - int(max(0, min(self.w - 1, x))), + int(max(0, min(self.h - 1, y))) + ][ + int(max(0, min(self.w - 1, x))) ] def _to_pil(self):