If I were you, I'd just edit the image with a program like gimp and cut out the white part. Is there any reason not to do it this way?
How can I delimit a transparent area on png image when I'm using HTML 5 Canvas?
-
20-06-2023 - |
Вопрос
I'm having some issues when I'm trying to delimit a area in html5 canvas, I have this img:
I want to get transparency only in white parts of img, not on all img. I'm drawing the img in this part of code:
this.draw = function(){
context.save();
context.drawImage(sniperScoop, 0, 0, w,h);
context.restore();
}
That is possible using HTML 5 Canvas/Javascript ?
Thanks!
Решение
Не связан с StackOverflow