HTML 5 Canvas and Javascript: Combining layered canvases

陌路散爱 提交于 2020-01-04 05:49:11

问题


I wanted to combine images from different canvases (layered on top of each other using z-index) to export as one single image.

Is this possible?


回答1:


Same :

How can I save div as image at client side where div contains one or more than one HTML5 canvas elements?

Save many canvas element as image




回答2:


Try using the context.getImageData() and context.putImageData(). I haven't tried that in Javascript before, but it shouldn't be that difficult.

HTML Canvas 2D Context



来源:https://stackoverflow.com/questions/4612719/html-5-canvas-and-javascript-combining-layered-canvases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!