当前位置: 动力学知识库 > 问答 > 编程问答 >

How to generate canvas component server side and send it to client side in Node.js?

问题描述:

I want to create a canvas component server side then will convert that in image and I will send it to client side. I want to perform this in Node.js

Facing problem in creating canvas component server side.

网友答案:

node.js does not have any kind of DOM by default and can't operate on elements such as canvas. But you can look here: https://github.com/Automattic/node-canvas

That package allows you to manipulate a canvas-like object server-side.

分享给朋友:
您可能感兴趣的文章:
随机阅读: