简体   繁体   English

HTML 5 Canvas和Javascript:组合分层画布

[英]HTML 5 Canvas and Javascript: Combining layered canvases

I wanted to combine images from different canvases (layered on top of each other using z-index) to export as one single image. 我想合并来自不同画布的图像(使用z-index彼此叠加)以导出为单个图像。

Is this possible? 这可能吗?

Try using the context.getImageData() and context.putImageData(). 尝试使用context.getImageData()和context.putImageData()。 I haven't tried that in Javascript before, but it shouldn't be that difficult. 我以前没有用Javascript尝试过,但是应该没有那么困难。

HTML Canvas 2D Context HTML Canvas 2D上下文

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM