MCPcopy Create free account
hub / github.com/NVlabs/RADIO / paint_headers

Function paint_headers

tools/im_join.py:112–119  ·  view source on GitHub ↗
(pil_buff)

Source from the content-addressed store, hash-verified

110 buff[r_pix:r_pix+max_height, c_pix:c_pix+max_width] = img
111
112 def paint_headers(pil_buff):
113 draw = ImageDraw.Draw(pil_buff)
114 def _stage(img, c, r, c_pix, r_pix):
115 header_text = header_lookup.get((r, c), None)
116 if header_text:
117 # bbox = draw.textbbox((4, 4), header_text, font)
118 draw.text((4 + c_pix, 4 + r_pix), header_text, font=font, anchor='lt', fill=(0, 0, 0))
119 return _stage
120
121 render_into(paint_images)
122 pil_buff = Image.fromarray(buff, mode='RGB')

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…