Skip to content

Commit

Permalink
textsize -> textbbox
Browse files Browse the repository at this point in the history
  • Loading branch information
massongit committed Oct 16, 2022
1 parent 7a76501 commit 27985eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/hatomap.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def cv2_putText_3(img, text, org, fontFace, fontScale, color):
imgPIL = Image.fromarray(img)
draw = ImageDraw.Draw(imgPIL)
fontPIL = ImageFont.truetype(font=fontFace, size=fontScale)
w, h = draw.textsize(text, font=fontPIL)
_, _, w, h = draw.textbbox((0, 0), text, font=fontPIL)
draw.text(xy=(x, y - h), text=text, fill=color, font=fontPIL)
return np.array(imgPIL, dtype=np.uint8)

Expand Down

0 comments on commit 27985eb

Please sign in to comment.