(draw, text)
| 23 | ImageFile.LOAD_TRUNCATED_IMAGES = True |
| 24 | |
| 25 | def 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 | |
| 35 | def visualize_box_mask(im, results, labels, threshold=0.5): |
no outgoing calls
no test coverage detected