mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-08 02:02:36 -08:00
commit
d5ce044bcd
2 changed files with 133 additions and 44 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