Spaces:
Configuration error
Configuration error
Fix white patch to not apply on aligned side
Browse files125 unmodified lines126127128129130131132133134135125 unmodified lines# Calculate overlap areaswhite_gaps_patch = 2left_overlap = margin_x + overlap_x if overlap_left else margin_x + white_gaps_patchright_overlap = margin_x + new_width - overlap_x if overlap_right else margin_x + new_width - white_gaps_patchtop_overlap = margin_y + overlap_y if overlap_top else margin_y + white_gaps_patchbottom_overlap = margin_y + new_height - overlap_y if overlap_bottom else margin_y + new_height - white_gaps_patch# Draw the maskmask_draw.rectangle([125 unmodified lines126127128129130131132133134135136137138139140141142143144145146125 unmodified lines# Calculate overlap areaswhite_gaps_patch = 2left_overlap = margin_x + overlap_x if overlap_left else margin_x + white_gaps_patchright_overlap = margin_x + new_width - overlap_x if overlap_right else margin_x + new_width - white_gaps_patchtop_overlap = margin_y + overlap_y if overlap_top else margin_y + white_gaps_patchbottom_overlap = margin_y + new_height - overlap_y if overlap_bottom else margin_y + new_height - white_gaps_patchif alignment == "Left":left_overlap = margin_x + overlap_x if overlap_left else margin_xelif alignment == "Right":right_overlap = margin_x + new_width - overlap_x if overlap_right else margin_x + new_widthelif alignment == "Top":top_overlap = margin_y + overlap_y if overlap_top else margin_yelif alignment == "Bottom":bottom_overlap = margin_y + new_height - overlap_y if overlap_bottom else margin_y + new_height# Draw the maskmask_draw.rectangle([
app.py+11