|
|
|
@ -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):
|
|
|
|
|