@ -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)
if gpio.input(self.a4_pin) == 0: