hand optimize for extra pixels

workspace
Brendan Howell 8 years ago
parent 3359906e42
commit 38d98edc4e

@ -111,8 +111,14 @@ class Photography(Bureau):
# crop # crop
img = Image.open(tmpimg.name) 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 xsize, ysize = img.size
if gpio.input(self.a4_pin) == 0: if gpio.input(self.a4_pin) == 0:

Loading…
Cancel
Save