laitkor commited on
Commit
91990cf
·
verified ·
1 Parent(s): 9f01959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -192,7 +192,7 @@ def crop_image(image, left_mm, top_mm, right_mm, bottom_mm):
192
  bottom = mm_to_pixels(bottom_mm, dpi)
193
  print("left:",left,"top:",top,"right:",right,"bottom:",bottom)
194
  if img.width - right <= left :
195
- right=left+1
196
 
197
  # Crop the image
198
  cropped_img = img.crop((left, top, img.width - right, img.height - bottom))
 
192
  bottom = mm_to_pixels(bottom_mm, dpi)
193
  print("left:",left,"top:",top,"right:",right,"bottom:",bottom)
194
  if img.width - right <= left :
195
+ right=img.width-left-1
196
 
197
  # Crop the image
198
  cropped_img = img.crop((left, top, img.width - right, img.height - bottom))