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
# Example with distortion
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:
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.