JSPM

aratio-gen

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q13253F
  • License MIT

CLI tool to generate media with various aspect ratios

Package Exports

  • aratio-gen
  • aratio-gen/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aratio-gen) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

aratio-gen

CLI tool for generating placeholder images with common aspect ratios used in digital advertising and applications.

Features

  • Generate images with standard aspect ratios: 9:16, 2:3, 3:4, 4:5, 1:1, 4:3, 3:2, 16:9
  • Interactive command-line interface
  • Randomized pixel patterns for visual distinction
  • Large aspect ratio labels for easy identification
  • Support for PNG, JPEG, GIF, BMP, and TIFF formats
  • Batch generation capabilities (1-100 images per aspect ratio)
  • Configurable output dimensions

Installation

Using npx (no installation required)

npx aratio-gen

Global installation

npm install -g aratio-gen
aratio-gen

Local development

git clone <repository-url>
cd aratio-gen
npm install
npm run build

Usage

After installation, run:

aratio-gen

Or use directly without installation:

npx aratio-gen

Interactive Options

  1. Aspect Ratios - Select one or more ratios
  2. Quantity - Number of images per ratio (1-100)
  3. Format - Image format (PNG, JPEG, GIF, BMP, TIFF)
  4. Base Width - Width in pixels (100-4000)
  5. Output Directory - Destination folder

Output

Files are named: aratio-gen_<aspect-ratio>_<index>.<format>

Example: aratio-gen_16x9_1.png

Development

npm run dev    # Run with ts-node
npm run build  # Compile TypeScript
npm run clean  # Remove build artifacts

Requirements

  • Node.js >= 18.0.0
  • TypeScript 5.4.0

License

MIT