问题描述
我正在使用node.js和Express Web框架,我需要创建一个即时图像 .png 或 .jpg (如验证码),然后我必须将该图像发送到浏览器。
i'm using node.js and Express web framework, I need to create an on the fly image .png or .jpg (like captcha), then i have to send that image to the browser.
最简单的方法是什么?
在图像中,我应该写字母/数字(最多5个)。
What is the simplest way to do that?In the image I should write letters/numbers (max 5).
我不知道使用哪个库来连接到在线服务,因为recaptcha模块。
P.S. I don't know what library to use that connects to an online service as the recaptcha module does.
推荐答案
也许你可以使用? Learnboost(TJ)的node.js中还有一个很有趣。从演示中可以看出,它甚至在一些例子中呈现文字。另外在 / 我发现了更多有趣的链接
Maybe you could use canvas? There is also an implementation in node.js by Learnboost(TJ). I think this screencast is interesting to look at. As you see from presentation it even renders text in some examples. Also in the npm registry / node modules section I found a lot more interesting links
这篇关于如何使用Node.js快速创建图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!