diff --git a/screenless/bureau/photography/photography.py b/screenless/bureau/photography/photography.py index 1803802..94f2239 100644 --- a/screenless/bureau/photography/photography.py +++ b/screenless/bureau/photography/photography.py @@ -111,8 +111,14 @@ class Photography(Bureau): # crop img = Image.open(tmpimg.name) + img = img.transpose(Image.ROTATE_180) + xsize, ysize = img.size - #TODO: crop here to trim calibrated extra pixels + #crop here to trim calibrated extra pixels + loffset = round(xsize * (float(23) / 257)) + roffset = round(xsize * (float(8) / 257)) + box = (loffset, 0, roffset, ysize) + img = img.crop(box) xsize, ysize = img.size if gpio.input(self.a4_pin) == 0: