crtimg

Crates.iocrtimg
lib.rscrtimg
version0.1.0
created_at2025-11-26 18:14:00.529737+00
updated_at2025-11-26 18:14:00.529737+00
descriptionA CLI tool that processes a pixel art image to make it CRT-ish.
homepage
repositoryhttps://github.com/noau/crtimg
max_upload_size
id1951961
size80,415
Dexter Chen (noau)

documentation

README

crtimg - Retro CRT Effect Tool

crtimg is a small and fast command-line tool for applying a retro Cathode Ray Tube (CRT) effect to your images. It's written in Rust and is designed to be simple to use.

Features

  • Nearest-Neighbor Upscaling: Preserves sharp pixels for a retro feel.
  • Scanlines: Adds classic horizontal scanlines.
  • Glow/Bloom: Simulates the characteristic glow of CRT phosphors.
  • Barrel Distortion: Simulates the curvature of a CRT screen.
  • Optional Blur: A final, gentle blur pass to soften the image.
  • Debugging Cache: Save intermediate processing steps for inspection.

Usage

To process an image, simply run the tool with the path to your input file.

# Basic Usage
crtimg <path-to-image> [OPTIONS]

# Example with distortion
crtimg ./assets/ferris.png --upscale-factor 8 --distortion --distortion-strength 3.0e-7

Options

Flag Description Default
--upscale-factor The integer factor by which to upscale the image (e.g., 4). Must be >= 2. 2
--scanline-disable Disables the scanline effect. false
--scanline-height The height of the scanline in pixels. Must be > 0 and < upscale-factor. upscale-factor / 2
--blur Adds a final, gentle blur to the image. Applied before distortion. false
--distortion Applies a barrel distortion effect to simulate a curved screen. false
--distortion-strength Sets the strength of the barrel distortion. Higher values are stronger. 2.0e-7
--cache Saves the output of each processing stage to the ./cache directory. false

Build from Source

You can build the project using Cargo:

cargo build --release

The optimized binary will be located at target/release/crtimg.

License

This project does not currently have a license. You may want to add one before distributing it.

Commit count: 0

cargo fmt