Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

random-image-generator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-image-generator

Generates random JPEG images

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Random Image Generator

travis-ci.org

An npm module for generating random images. Intended for use in automated tests that require unique images.

Currently only supports generating very noisy JPEGs.

Available as both a node module in code and a command line tool.

Example

Example Random Image

Usage

JavaScript

var randomImageGenerator = require('random-image-generator'),
    fs = require('fs');

/**
 * Takes a width and height parameter
 * Returns a Buffer containing a JPEG image
 */
randomImageGenerator(800, 600, function(err, image) {
    fs.writeFile('random-image.jpg', image, function(err) {
        // done, hopefully
    });
});

Command Line

npm install -g random-image-generator

random-image-generator 800 600 > random-image.jpg

Keywords

FAQs

Package last updated on 06 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc