countdown fix

This commit is contained in:
gocivici 2023-10-19 14:29:16 +03:00
parent 67cee95f1e
commit 343ed5346b

View File

@ -29,6 +29,7 @@ if cam.isOpened():
draw = ImageDraw.Draw(img) draw = ImageDraw.Draw(img)
font_size = 350 font_size = 350
font = ImageFont.truetype("HalloweenFont.ttf", font_size) font = ImageFont.truetype("HalloweenFont.ttf", font_size)
if TIMER>1:
draw.text((231, 50), str(TIMER), font=font,fill=(255,0,0,255)) draw.text((231, 50), str(TIMER), font=font,fill=(255,0,0,255))
img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR) img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)
cv2.imshow('webcam',img) cv2.imshow('webcam',img)