chore: publish from main

This commit is contained in:
github-actions[bot]
2026-07-13 00:07:28 +00:00
parent 3fc4224146
commit d981b567a6
2 changed files with 4 additions and 2 deletions
@@ -416,7 +416,8 @@ def annotate_image(image_path, annotations, *,
cyan = (eb[0] - em_pad, eb[1] - em_pad, eb[2] + em_pad, eb[3] + em_pad)
lines = spec['label'].split('\n')
tw = max(font.getbbox(line)[2] - font.getbbox(line)[0] for line in lines)
line_h = font.getbbox('Ay')[3] - font.getbbox('Ay')[0]
bbox = font.getbbox('Ay')
line_h = bbox[3] - bbox[1]
th = line_h * len(lines) + 4 * (len(lines) - 1)
pw, ph = tw + 2 * TEXT_PAD, th + 2 * TEXT_PAD
cands = _find_candidates(pixels, W, H, cyan, pw, ph, font)
+2 -1
View File
@@ -416,7 +416,8 @@ def annotate_image(image_path, annotations, *,
cyan = (eb[0] - em_pad, eb[1] - em_pad, eb[2] + em_pad, eb[3] + em_pad)
lines = spec['label'].split('\n')
tw = max(font.getbbox(line)[2] - font.getbbox(line)[0] for line in lines)
line_h = font.getbbox('Ay')[3] - font.getbbox('Ay')[0]
bbox = font.getbbox('Ay')
line_h = bbox[3] - bbox[1]
th = line_h * len(lines) + 4 * (len(lines) - 1)
pw, ph = tw + 2 * TEXT_PAD, th + 2 * TEXT_PAD
cands = _find_candidates(pixels, W, H, cyan, pw, ph, font)