sjotorp_image
This is a node module for generating random images.
- Works platform independent
- Needs no building thanks to jpeg-js
- Generates random colored images
I needed this for creating dummy datasets including images in combination with faker.js and / or choice.js
Uses the jpeg-js library: https://github.com/eugeneware/jpeg-js
Installation
npm install sjotorp_image
Example Usage
var fs = ;var imgGen = ; // Generate one imageimgGen; // Generate multiple images// Will generate same color on the images every time we run since we use the// fileName as a seedforvar i=1;i<=10;i++ var fileName = 'dummy-' + i + '.jpg'; var color = imgGen; imgGen;