Skip to main content

A fast, memory-efficient and robust library for loading, validating and decoding cryptomattes.

Project description

cryptomatte-api

ko-fi

About

The cryptomatte-api is a fast, memory-efficient and robust library for loading, validating and decoding cryptomattes. It is meant to serve as a de-facto standard implementation of cryptomatte loading that is DCC-agnostic and runs as a standalone.

It is written entirely using C++20 while also providing pre-built python binaries that are pip-installable.

Features

  • Robust and accurate decoding of cryptomattes (v1.2.0 spec)
  • Fully compliant with the specification
  • Extremely fast even at high resolutions
  • Very memory efficient
  • Rigorously tested

Performance

The cryptomatte-api allows you to decode hundreds of cryptomattes for billions of pixels in less than a second. It is fast and efficient for both small and large images. During our :ref:cmatte_benchmarks we test from just 320x140 pixels to 14480x8370 pixels for over 200 masks per-image.

We allow you to decode using in-memory compression or directly into a flat buffer giving you the flexibility to choose depending on your performance and memory needs.

Quickstart

This is a simple example of getting you up and running with the cryptomatte-api, loading a file from disk (which validates it) and then extract one or more masks from the image.

C++

#include <cryptomatte/cryptomatte.h>

auto matte = cmatte::cryptomatte::load("from/disk/path", false /* load preview channels */);
auto mask = matte.mask("my_mask"); // will throw if 'my_mask' is not available
auto all_masks = matte.masks_compressed(); // get all the 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") # will raise if 'my_mask' is not available
all_masks = matte.masks() # get all the masks of the cryptomatte mapped by names.

License

BSD 3-Clause License

Copyright (c) 2025, Emil Dohne

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
	list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
	this list of conditions and the following disclaimer in the documentation
	and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
	contributors may be used to endorse or promote products derived from
	this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cryptomatte_api-1.0.0.tar.gz (25.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cryptomatte_api-1.0.0-cp313-cp313-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.13Windows x86-64

cryptomatte_api-1.0.0-cp313-cp313-manylinux_2_34_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

cryptomatte_api-1.0.0-cp313-cp313-macosx_14_0_arm64.whl (5.9 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

cryptomatte_api-1.0.0-cp312-cp312-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.12Windows x86-64

cryptomatte_api-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

cryptomatte_api-1.0.0-cp312-cp312-macosx_14_0_arm64.whl (5.9 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

cryptomatte_api-1.0.0-cp311-cp311-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.11Windows x86-64

cryptomatte_api-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

cryptomatte_api-1.0.0-cp311-cp311-macosx_14_0_arm64.whl (5.9 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

cryptomatte_api-1.0.0-cp310-cp310-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.10Windows x86-64

cryptomatte_api-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

cryptomatte_api-1.0.0-cp310-cp310-macosx_14_0_arm64.whl (5.9 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

cryptomatte_api-1.0.0-cp39-cp39-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.9Windows x86-64

cryptomatte_api-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

File details

Details for the file cryptomatte_api-1.0.0.tar.gz.

File metadata

  • Download URL: cryptomatte_api-1.0.0.tar.gz
  • Upload date:
  • Size: 25.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cryptomatte_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f6d3256b0695b52fbfd04feac628ede36a4820dd500416d39e256d079c3fb663
MD5 b1283f23abc6a04a44b4d72b21880635
BLAKE2b-256 d4bf6f7a4f87db971a8946880397c027e65ba7d70751022c4b798d7ad854d370

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0.tar.gz:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b45261053ca9851f5f249bbc221b1007ed80dbeaf13df6037f3c5adea6fed519
MD5 54267ac5f04d4be4376cb2069380f6e7
BLAKE2b-256 7f39d49b08796291ab90c2657ede71534e0e7d40d44395273a958791f0c716e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp313-cp313-win_amd64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a72b1b289fee011d601b08342ac19c3e080ebb6fb1524d86447cf896c3024fba
MD5 1a4e1885702c9d3a1feab726ef77eb48
BLAKE2b-256 186f70d8fa3cbf02f499319d6ab34e3c5966f7c498ee38a4ce7b7ae5c7f7d71b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ed677bab36ad4f6b48ac45505407265c6f869444a351069c1911c5c1b3d28810
MD5 2dc8da8adf0c185bc5ddf0fd77c1c4df
BLAKE2b-256 2a2cc59ba7ebd7b3eb64eab902319b405943d2f76c530077c9812860024b706a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 38bc505f4b5802a26fb616b1956515974c86580c1ded7648c15f1783f6aebc8b
MD5 bb0b39271cf53075f110984ec9b7a4b1
BLAKE2b-256 391fb38decb2f9974961f1321d1e3e620967dae56bab02e73342f6dfa851ff1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp312-cp312-win_amd64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8770c718014a75953f6d409faf52dc73e69a1528592fe3699343acb76406492c
MD5 64867ca7365184eb647b1d9b54a7c0bf
BLAKE2b-256 e63128ff71aa4728e65ee0bfeaf8a6b8d02637cd85fdd2b376d76771e84dc16a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0bdb3b5780df1f6b4eac75309eca677051e91f51965dd049eab8305b0b5cafe4
MD5 fc1b99efe733efcc8ae3a78dc8143098
BLAKE2b-256 27625417d5668774b6a6bc8074a3fb4524095203324bc89329b461dc913bd90d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e74e66e1a420d69d59769702bb0300d01fcbd0ce18d2b74067386189f5cdd942
MD5 1bca255e7d47419e21457216d72eed7e
BLAKE2b-256 fa84a6368cc409c791835e8a964be16c59cd713b6b38ea575e5e7a961f28ac96

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp311-cp311-win_amd64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2edf366c3e83ad74118027e85054547578030b45b1b4b79dd7295f56e0c0c6ec
MD5 1da1bb390124b8d0ed5dd9ce991a21c7
BLAKE2b-256 990e249cd026453064fc60365aa6ed6bfb432d6772b4ab60aa27418f36418b84

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2c3e6ea81c9c8e534d54a183e01f79f52e5aac87cc317822412115d14ed9b419
MD5 c8cf04c14ae8b2ba2de9cdd90e1dc8a4
BLAKE2b-256 632a731af937857a8697a41f0a48b3abf53e63ccdb1b97761c6d50222ff8ce9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8977154594ab1d2b85e00da3d6364addc807c3dd80ee780e5912fde9bce963b8
MD5 ff9034b1fe40284677b3223a27b563ac
BLAKE2b-256 b3e0d6b62f39e207cc5baec34096eaea956761ca34f563beb040066c2c25f3f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp310-cp310-win_amd64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1ca7ff949f17a0f6875ffe64464970d68d9353a608cda825aae445fb4f0b281d
MD5 5fc516b08f75a56247f42db3a4d8f298
BLAKE2b-256 264e7fb774eb1eb721a053a656dd4fe7139df547c8dc3a1c09527af1f1f6c4c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2227561198cbc97029bfd170f80ba77426dc58253ad8dce24a58b2ca4e29333e
MD5 511d161c9939087c0a2a0c2bdf12dab2
BLAKE2b-256 eb5ebc6a74f65c576f0a2db661bb29808e3fcea9db9b1c0f302c66c4dc931783

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5b798c6ca0c99f25940c23ab8f669dd9d935c79b4132237abc0d534d37650b9c
MD5 5ea5221be9c317368a33dc35611c8266
BLAKE2b-256 7c0a2cf8f4d98dc4bcb3e2ca42f727cc717e45faa9df298da68630acb28f3ba2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp39-cp39-win_amd64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptomatte_api-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cryptomatte_api-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 76ffda6f1b0ff7758143c2140091cf82102ded74f5a3ef88ecad729c0defd537
MD5 db8a12ea939f4ca1c6d620061fa2e9c8
BLAKE2b-256 96715757a300fdfe48d3c6f7a3953f6d76ca46f941096fecceb8ac1ea006baef

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptomatte_api-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl:

Publisher: cmake-wheels.yml on EmilDohne/cryptomatte-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page