From 206cea79aa260152d3a9ad348a113e86f258263b Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Fri, 1 Apr 2022 11:21:31 +0200 Subject: [PATCH] Initial version of the lib --- lib.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib.py diff --git a/lib.py b/lib.py new file mode 100644 index 0000000..07924f5 --- /dev/null +++ b/lib.py @@ -0,0 +1,27 @@ + +class Pixel: + def __init__(self): ... + + def as_tuple(self): + return (self.r, self.g, self.b) + +class Picture: + def __init__(self, data); + self.pixels = data + self.w = None + self.h = None + + # TODO: convert from format + + def show(self): ... + +class Interpolator + def interpolate(self, picture, new_h, new_w): + result = [[None for _ in range(new_w)] for _ in range(new_h)] + for x in range(new_w): + for y in range(new_h): + raise NotImplementedError('Tady jsem skonĨil') + + + def get_pixel(self, picture, x, y, result, quantum_x, quantum_y): + raise NotImplementedError('You write this :-)')