Skip to content

Commit acbef5e

Browse files
authored
Update app.js
1 parent cf648f2 commit acbef5e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

text-art/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ function scanImage(ctx, cvs){
6868
const alpha = scannedData[index+3]/255;
6969
const color = `rgba(${red}, ${green}, ${blue}, ${alpha})`;
7070
if(alpha>0){
71+
ctx.globalCompositeOperation = "source-over";
7172
ctx.fillStyle = color;
7273
ctx.textAlign = "left";
7374
ctx.font = gap + 'px Arial';
@@ -118,3 +119,4 @@ for(let i=0;i<2;i++){
118119
}
119120

120121

122+

0 commit comments

Comments
 (0)