Good morning, i have a canvas with a background image, i need to put another image over it and apply a mask on it to have some transparency. Here you can find a link to a sample of the final result i need. Can anyone help me? 解决方案 imagecontext.drawImage(mask, 0, 0, width, height);imagecontext.globalCompositeOperation = 'source-atop';imagecontext.drawImage(img, 0, 0);http://codepo8.github.io/canvas-masking/ 这篇关于将位图蒙版应用于html5画布上的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-09 17:50