# test_image_cli A development tool for generating test images and writing them to PPM files. Used to verify the `test_image` module's pattern generators and pixel format output without needing a camera or display. --- ## Build From the repository root: ```sh make cli ``` The binary is placed in `build/cli/`. --- ## Usage ```sh ./test_image_cli [--pattern bars|ramp|grid] [--width N] [--height N] [--format yuv420|yuv422|bgra] --out FILE.ppm ``` All options are optional except `--out`. | Option | Default | Description | |---|---|---| | `--pattern` | `bars` | Test pattern to generate | | `--width N` | `1280` | Image width in pixels | | `--height N` | `720` | Image height in pixels | | `--format` | `yuv420` | Internal pixel format before PPM conversion | | `--out FILE` | required | Output file path | ### Patterns | Name | Description | |---|---| | `bars` | Colour bars (SMPTE-style) | | `ramp` | Luminance ramp from black to white | | `grid` | Crosshatch grid | ### Formats | Name | Description | |---|---| | `yuv420` | Planar YUV 4:2:0 | | `yuv422` | Packed YUV 4:2:2 | | `bgra` | Packed BGRA 8-bit | The output is always written as a PPM (RGB) file regardless of format; the internal format affects how the pattern is generated and converted. ### Example ```sh ./test_image_cli --pattern bars --width 1920 --height 1080 --format yuv420 --out bars.ppm ``` Open with any image viewer that supports PPM (e.g. `feh`, `eog`, GIMP). --- ## Relationship to the Video Routing System `test_image_cli` exercises the `test_image` module used by development tools to inject synthetic frames without a camera. The same module drives the xorg test pattern display in `xorg_cli`. See also: [`xorg_cli.md`](xorg_cli.md) for live window rendering.