diff --git a/video.mjs b/video.mjs index 4278f5c..648948d 100644 --- a/video.mjs +++ b/video.mjs @@ -6,14 +6,17 @@ async function overlayImage(time_string) { let ctx = createCanvas(853, 479).getContext('2d'); let bg = await loadImage('bg.png') + ctx.globalAlpha = 1; ctx.drawImage(bg, 0, 0, 853, 479) let overlay = await loadImage('images/raw/' + time_string + '.png') + ctx.globalAlpha = 0.6; ctx.drawImage(overlay, 0, 0, 853, 479) let text = time_string.substring(8, 10) + ':' + time_string.substring(10, 12); ctx.font = 'bold 70px sans-serif'; ctx.fillStyle = 'rgba(0,0,0,0.7)'; + ctx.globalAlpha = 0.9; ctx.fillText(text, 853 - 250, 479 - 40); return ctx.canvas.toBuffer("image/png");