MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / compose_image

Function compose_image

text2motion/utils/utils.py:97–108  ·  view source on GitHub ↗
(img_list, col, row, img_size)

Source from the content-addressed store, hash-verified

95
96
97def compose_image(img_list, col, row, img_size):
98 to_image = Image.new('RGB', (col * img_size[0], row * img_size[1]))
99 for y in range(0, row):
100 for x in range(0, col):
101 from_img = Image.fromarray(img_list[y * col + x])
102 # print((x * img_size[0], y*img_size[1],
103 # (x + 1) * img_size[0], (y + 1) * img_size[1]))
104 paste_area = (x * img_size[0], y*img_size[1],
105 (x + 1) * img_size[0], (y + 1) * img_size[1])
106 to_image.paste(from_img, paste_area)
107 # to_image[y*img_size[1]:(y + 1) * img_size[1], x * img_size[0] :(x + 1) * img_size[0]] = from_img
108 return to_image
109
110
111def list_cut_average(ll, intervals):

Callers 1

compose_and_save_imgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected