Spaces:
Running
on
Zero
Running
on
Zero
patch tiny white gaps 2
Browse files
app.py
CHANGED
|
@@ -127,9 +127,9 @@ def prepare_image_and_mask(image, width, height, overlap_percentage, resize_opti
|
|
| 127 |
# Calculate overlap areas
|
| 128 |
white_gaps_patch = 2
|
| 129 |
left_overlap = margin_x + overlap_x if overlap_left else margin_x + white_gaps_patch
|
| 130 |
-
right_overlap = margin_x + new_width - overlap_x if overlap_right else margin_x + new_width
|
| 131 |
top_overlap = margin_y + overlap_y if overlap_top else margin_y + white_gaps_patch
|
| 132 |
-
bottom_overlap = margin_y + new_height - overlap_y if overlap_bottom else margin_y + new_height
|
| 133 |
|
| 134 |
# Draw the mask
|
| 135 |
mask_draw.rectangle([
|
|
|
|
| 127 |
# Calculate overlap areas
|
| 128 |
white_gaps_patch = 2
|
| 129 |
left_overlap = margin_x + overlap_x if overlap_left else margin_x + white_gaps_patch
|
| 130 |
+
right_overlap = margin_x + new_width - overlap_x if overlap_right else margin_x + new_width - white_gaps_patch
|
| 131 |
top_overlap = margin_y + overlap_y if overlap_top else margin_y + white_gaps_patch
|
| 132 |
+
bottom_overlap = margin_y + new_height - overlap_y if overlap_bottom else margin_y + new_height - white_gaps_patch
|
| 133 |
|
| 134 |
# Draw the mask
|
| 135 |
mask_draw.rectangle([
|