Javascript generate random images

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

JavaScript random image generator

ashupp/js-image-generator

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

This is a node module for generating random images.

  • Works platform independent
  • Needs no building thanks to jpeg-js
  • Generates random colored, noisy images

I needed this for creating dummy datasets including images in combination with faker.js and / or choice.js

npm install js-image-generator
var fs = require('fs'); var imgGen = require('js-image-generator'); // Generate one image imgGen.generateImage(800, 600, 80, function(err, image)  fs.writeFileSync('dummy.jpg', image.data); >); // Generate multiple images for(var i=1;i10;i++) imgGen.generateImage(800, 600, 80, function(err, image)  console.log("Generating image #" +i); fs.writeFileSync('dummy-' + i + '.jpg', image.data); >); >

About

JavaScript random image generator

Источник

Читайте также:  Linked list and doubly linked list in java
Оцените статью