Skip to content

Releases: EmilDohne/cryptomatte-api

v1.0.0

20 Sep 10:23
84c1b6c

Choose a tag to compare

cryptomatte-api 1.0.0

The first stable release of cryptomatte-api is now available. This C++20 library (with pip-installable Python bindings) provides fast, memory-efficient, and robust cryptomatte loading, validation, and decoding. It is designed to be the de-facto standard, DCC-agnostic implementation of cryptomatte handling.

Key Features

  • Fully compliant with the v1.2.0 Cryptomatte specification
  • Extremely fast even at very high resolutions
  • Very memory efficient, handles hundreds of masks for billions of pixels with ease
  • Rigorously tested across a variety of sample files
  • Cross-platform support: Linux, Windows, macOS
  • Python bindings with a familiar, NumPy-friendly API

When to Use It

Use cryptomatte-api when you need reliable, specification-compliant cryptomatte decoding in C++ or Python. Ideal for render farms, compositing pipelines, asset validation tools, or any scenario where speed and correctness are critical.

Performance

In benchmarks, cryptomatte-api decodes hundreds of cryptomattes for billions of pixels in under a second. You can choose between in-memory compressed decoding or direct flat-buffer decoding depending on your performance and memory needs.

Example Usage

C++

#include <cryptomatte/cryptomatte.h>

auto matte = cmatte::cryptomatte::load("from/disk/path", false /* load preview channels */);
auto mask = matte.mask("my_mask"); // throws if 'my_mask' is not available
auto all_masks = matte.masks_compressed(); // get all masks as compressed channels

Python

import cryptomatte_api as cmatte

matte = cmatte.Cryptomatte.load("from/disk/path", load_preview=False)
mask = matte.mask("my_mask")  # raises if 'my_mask' is not available
all_masks = matte.masks()     # get all masks as a dict of name -> channel

Documentation

Full documentation is available at cryptomatte-api.readthedocs.io, including API details, examples, and benchmark results.