Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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))
|