Skip to main content
Glama
README.md
# ThumbGen

[简体中文](README.zh-CN.md) · [Releases](https://github.com/mogurt/ThumbGen/releases/latest) · [Documentation](docs/en/README.md) · [CLI reference](docs/en/cli.md) · [MCP server](docs/en/mcp.md)

[![Release](https://img.shields.io/github/v/release/mogurt/ThumbGen?label=release)](https://github.com/mogurt/ThumbGen/releases/latest)
[![PyPI](https://img.shields.io/pypi/v/thumbgen-cli?label=pypi)](https://pypi.org/project/thumbgen-cli/)
[![Windows](https://github.com/mogurt/ThumbGen/actions/workflows/windows.yml/badge.svg?branch=main)](https://github.com/mogurt/ThumbGen/actions/workflows/windows.yml)
[![Linux](https://github.com/mogurt/ThumbGen/actions/workflows/linux.yml/badge.svg?branch=main)](https://github.com/mogurt/ThumbGen/actions/workflows/linux.yml)
![Platform](https://img.shields.io/badge/platform-Windows%20x64%20%7C%20Linux%20glibc%202.17%2B-475569)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

**Native C++ speed. OCIO color. Cryptomatte, Deep EXR and Z-depth previews.**

ThumbGen is a fast, standalone OpenEXR and image thumbnail generator built on OpenImageIO (OIIO) and OpenColorIO (OCIO) for VFX, animation and game production pipelines. Decode once for multiple preview sizes, process large frame batches in parallel under bounded memory, and run without Python.

**Ready-to-run prebuilt binaries** for Windows x64 and Linux x86_64 (`glibc >= 2.17`, compatible with CentOS 7.9, Rocky Linux 8/9 and modern distros) ship with all required OIIO/OCIO shared libraries bundled—no compiler or dependency build needed. Grab a standalone archive from [Releases](https://github.com/mogurt/ThumbGen/releases/latest) or install via `pip install thumbgen-cli`.

## Where it fits

For production workflows that need both high batch throughput and accurate access to multilayer/multipart EXR channels, AOVs, `dataWindow`/`displayWindow` geometry and color spaces (`ACEScg`, studio OCIO configs):

- **Render farms and result inspection**: generate multiple preview sizes per frame in a single pass and browse beauty, normals, Z depth and Cryptomatte to inspect renders and AOVs.
- **Art, compositing and technical art pipelines**: apply project OCIO configs (`--input-space`, `--display`, `--view`) to preview layered EXRs, data channels and supported Deep EXR renders.
- **Asset ingestion, version management and delivery**: create list and detail thumbnails for EXRs, PSD composites, textures and HDR environment maps so versions and deliverables are fast to browse.
- **Desktop tools and cloud platforms**: integrate via the CLI and streaming JSONL output with file pickers, publishing panels, ShotGrid/AYON/Kitsu hooks or remote asset libraries—generating previews where the files live to avoid transferring multi-hundred-megabyte frames.

## What can it do?

| Feature | What you get |
| --- | --- |
| **Fast** | Single decode for multiple target sizes, parallel worker pool, bounded scanline memory |
| **Zero-build deploy** | Portable C++17 CLI built on OpenImageIO with bundled runtime libraries and no Python dependency |
| **[OCIO](docs/en/color-cms.md)** | Project color configurations (`ACES`, custom `.ocio`), input spaces, displays and views |
| **[Cryptomatte](docs/en/cryptomatte.md)** | Stable-color overviews of Cryptomatte IDs and coverage, including multi-part EXRs |
| **[Deep EXR](docs/en/public-deep.md)** | Opt-in flattening and opacity previews of supported Deep EXRs within memory budgets |
| **[Z depth & AOVs](docs/en/data-preview.md)** | Fixed-range grayscale depth, normal, vector and integer ID previews consistent across sequences |
| **[MCP server](docs/en/mcp.md)** | Zero-dependency stdio MCP server (`thumbgen-mcp`) so AI agents can inspect EXR/HDR/Cryptomatte metadata and view OCIO previews |

Standard PNG, JPEG, TIFF, WebP, TGA, BMP, Radiance HDR, DPX and merged PSD composites work too, with alpha, EXIF orientation, multipart and channel selection. Integrating with pipeline scripts? Read file-by-file progress and structured diagnostics as JSONL.

## Speed and format support

**Fast batch previews without generic-tool EXR pitfalls.** General-purpose tools like `FFmpeg`, `ImageMagick`, `libvips` or Pillow often clip HDR highlights, misalign EXR `dataWindow` vs `displayWindow` canvases, or fail on multiresolution, multipart, Cryptomatte and Deep EXR files—while invoking `oiiotool` repeatedly per output size re-decodes heavy frames. ThumbGen decodes once per source image, preserves the full display canvas and aspect ratio, and enforces memory budgets.

![Five-tool comparison: EXR, standard images and tiny-image batches](docs/assets/five-tool-overview.svg)

In the chart, each EXR and standard image produces two previews, small and large; each tiny image produces one. Previews preserve the original aspect ratio without stretching. Color, filtering and compression differ between tools. [Full results, output sizes and image sources →](docs/en/benchmarks.md)

## See the previews

### Cryptomatte: scene IDs and transparent edges

![Cryptomatte previews of two scenes, showing stable ID colors, fine edges and coverage transparency](docs/assets/features/cryptomatte.png)

Turn IDs and coverage into a stable-color overview for checking objects and edges. This previews the whole family rather than extracting a named matte. [Using Cryptomatte →](docs/en/cryptomatte.md)

### Depth: make data channels visible

![Color and Z-depth previews of the same EXR, using a fixed range of 9 to 11 in source units](docs/assets/features/depth.png)

Select the Z channel and a range to create a grayscale preview. Keep the same range across frames for a consistent depth mapping. [Depth and data previews →](docs/en/data-preview.md)

### OpenColorIO: follow your project color settings

![The same linear Rec.709 EXR with Un-tone-mapped and ACES 1.0 SDR Video views on an sRGB display](docs/assets/features/ocio.png)

Use a project OCIO configuration and choose the input space, Display and View. Only the view changes above, showing different highlight and tone rendering. [Color management →](docs/en/color-cms.md)

These are actual ThumbGen outputs from publicly redistributable EXR samples. [Image sources and settings →](docs/en/public-assets.md#homepage-preview-images)

## Platforms and formats

Available as portable archives for **Windows x64** and **Linux x86_64 (`glibc >= 2.17`)**, tested on CentOS 7.9, Rocky Linux 9 and Ubuntu.

Read OpenEXR (scanline, tiled, multipart and supported Deep), PNG, JPEG, TIFF, WebP, TGA, BMP, Radiance HDR, DPX and supported PSD composites. Write JPEG, PNG and lossy WebP. See the [large-preview guide](docs/en/large-previews.md) for bounded scanline layouts and memory budget settings. Run `thumbgen capabilities --json` to inspect supported formats in your build.

## MCP server

ThumbGen includes a zero-dependency stdio MCP server (`thumbgen-mcp`) exposing `inspect_image`, `render_preview`, and `render_batch_previews` so Claude Code, Cursor, Claude Desktop, and other MCP clients can inspect EXR/HDR/Cryptomatte/Deep EXR/PSD files and view OCIO-managed PNG previews directly.

```json
{
  "mcpServers": {
    "thumbgen": {
      "command": "uvx",
      "args": ["--from", "thumbgen-cli", "thumbgen-mcp"]
    }
  }
}
```

See the [MCP setup guide](docs/en/mcp.md) for full client configs, tool parameters, and OCIO/AOV examples.

## Quick start

Install the prebuilt binary wheel from [PyPI](https://pypi.org/project/thumbgen-cli/) (`pip install thumbgen-cli`), or download the standalone archive for your platform from [GitHub Releases](https://github.com/mogurt/ThumbGen/releases/latest) when deploying without Python (extract the complete `ThumbGen` folder and keep `bin/` with its bundled shared libraries). [Installation guide →](docs/en/installation.md)

```sh
pip install thumbgen-cli
thumbgen convert frame.exr --output preview.jpg --size 960
thumbgen convert frame.exr --output-dir previews --size 425x260 --size 960x960
thumbgen convert frame.exr --output preview.png --background transparent
```

Images keep their aspect ratio and are not enlarged. Existing targets produce an error by default; use `--existing replace` to overwrite them.

For multilayer EXRs or project OCIO color spaces (`ACEScg`, custom studio configs):

```sh
thumbgen inspect multilayer.exr --json
thumbgen convert multilayer.exr --output beauty.jpg --channels Beauty
thumbgen convert frame.exr --output preview.jpg --ocio-config config.ocio --input-space ACEScg --display DISPLAY --view VIEW
```

Preview data channels, Cryptomatte and Deep EXR images:

```sh
thumbgen convert depth.exr --output depth.png --visualize depth --channels Z --data-range 0,1000
thumbgen convert crypto.exr --output crypto.png --visualize cryptomatte --channels CryptoObject
thumbgen convert deep.exr --output deep.png --deep-mode flatten
```

Replace channel names and depth ranges with values from your files. Cryptomatte creates a colored overview, not named-matte extraction.

## Batch processing

Put files and output sizes in a job manifest, then run:

```sh
thumbgen batch --manifest jobs.json --json
```

Generate multiple sizes per image and process frames in parallel across worker processes. Streaming JSONL results make it straightforward to track progress from Python, Rust, Go or shell pipeline scripts. [Batch manifest examples →](examples/public/README.md) · [Protocol and exit codes →](docs/en/protocol.md)

## Learn more

[Getting started](docs/en/getting-started.md) · [Command reference](docs/en/cli.md) · [Color management](docs/en/color-cms.md) · [All guides](docs/en/README.md)

For questions or bugs, include your version, platform, command and a small shareable input. Keep confidential studio assets and proprietary OCIO configurations private.

## License

ThumbGen is licensed under [Apache-2.0](LICENSE). Third-party dependencies retain their own licenses; see [dependencies](dependencies/).