Is it possible to create a random .jpg image using NPM?

时间:2017-06-09 12:39:30

标签: node.js npm node-modules

I'm creating an application that reads and posts to Twitter and for some reasons i want to add a random created image using NPM. is it possible? do i need a server side application for this?

3 个答案:

答案 0 :(得分:1)

There are two packages available which can meet up your requirements namely, random-image-generator and text-to-image which can generate you random images.

You can checkout them in the below URL's

random-image-generator : https://www.npmjs.com/package/random-image-generator

text-to-image : https://www.npmjs.com/package/text-to-image

Hope this helps!

答案 1 :(得分:0)

首先你只需谷歌"创建图像npm"你得到了大量的结果!
顺便说一句,如果你想创建一个你可以使用的图像:

NPM Image

安装:npm install image
只需阅读npm image

中的文档

答案 2 :(得分:0)

为将来参考, jidenticon 在这种情况下非常实用。单元测试的理想选择。

https://jdenticon.com/