mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-25 03:11:32 -08:00
handling sub grids and merging into one
This commit is contained in:
parent
9fc354e130
commit
e46bfa5a9e
2 changed files with 19 additions and 12 deletions
|
|
@ -195,7 +195,7 @@ def draw_grid_annotations(im, width, height, hor_texts, ver_texts):
|
|||
ver_text_heights = [sum([line.size[1] + line_spacing for line in lines]) - line_spacing * len(lines) for lines in
|
||||
ver_texts]
|
||||
|
||||
pad_top = max(hor_text_heights) + line_spacing * 2
|
||||
pad_top = 0 if sum(hor_text_heights) == 0 else max(hor_text_heights) + line_spacing * 2
|
||||
|
||||
result = Image.new("RGB", (im.width + pad_left, im.height + pad_top), "white")
|
||||
result.paste(im, (pad_left, pad_top))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue