MCPcopy Index your code
hub / github.com/PaddlePaddle/PaddleDetection / imagedraw_textsize_c

Function imagedraw_textsize_c

deploy/python/visualize.py:25–32  ·  view source on GitHub ↗
(draw, text)

Source from the content-addressed store, hash-verified

23ImageFile.LOAD_TRUNCATED_IMAGES = True
24
25def imagedraw_textsize_c(draw, text):
26 if int(PIL.__version__.split('.')[0]) < 10:
27 tw, th = draw.textsize(text)
28 else:
29 left, top, right, bottom = draw.textbbox((0, 0), text)
30 tw, th = right - left, bottom - top
31
32 return tw, th
33
34
35def visualize_box_mask(im, results, labels, threshold=0.5):

Callers 3

draw_boxFunction · 0.70
draw_press_box_lanesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected