{"id":31771910,"url":"https://github.com/emildohne/cryptomatte-api","last_synced_at":"2025-10-10T03:49:14.269Z","repository":{"id":315476199,"uuid":"976657655","full_name":"EmilDohne/cryptomatte-api","owner":"EmilDohne","description":"A fast, memory-efficient and robust library for loading, validating and decoding cryptomattes","archived":false,"fork":false,"pushed_at":"2025-09-20T10:40:52.000Z","size":55600,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-02T10:02:55.005Z","etag":null,"topics":["blosc2","cryptomatte","image-processing"],"latest_commit_sha":null,"homepage":"http://cryptomatte-api.readthedocs.org/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmilDohne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-02T14:03:41.000Z","updated_at":"2025-09-22T12:03:56.000Z","dependencies_parsed_at":"2025-09-18T22:09:06.842Z","dependency_job_id":null,"html_url":"https://github.com/EmilDohne/cryptomatte-api","commit_stats":null,"previous_names":["emildohne/cryptomatte-api"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/EmilDohne/cryptomatte-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilDohne%2Fcryptomatte-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilDohne%2Fcryptomatte-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilDohne%2Fcryptomatte-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilDohne%2Fcryptomatte-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmilDohne","download_url":"https://codeload.github.com/EmilDohne/cryptomatte-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilDohne%2Fcryptomatte-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002602,"owners_count":26083426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blosc2","cryptomatte","image-processing"],"created_at":"2025-10-10T03:49:09.812Z","updated_at":"2025-10-10T03:49:14.262Z","avatar_url":"https://github.com/EmilDohne.png","language":"C++","funding_links":["https://ko-fi.com/Q5Q4TYALW"],"categories":[],"sub_categories":[],"readme":"# cryptomatte-api\n\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Q5Q4TYALW)\n\n![](./docs/images/test_image.png)\n\nAbout\n=========\n\nThe ``cryptomatte-api`` is a fast, memory-efficient and robust library for loading, validating \nand decoding cryptomattes. It is meant to serve as a de-facto standard implementation of cryptomatte\nloading that is DCC-agnostic and runs as a standalone.\n\nIt is written entirely using C++20 while also providing pre-built python binaries that are pip-installable.\n\nFeatures\n=========\n\n- Robust and accurate decoding of cryptomattes (v1.2.0 spec)\n- Fully compliant with the specification\n- Extremely fast even at high resolutions\n- Very memory efficient\n- Rigorously tested\n\nPerformance\n===========\n\nThe ``cryptomatte-api`` allows you to decode hundreds of cryptomattes for billions of pixels in \nless than a second. It is fast and efficient for both small and large images. During our :ref:`cmatte_benchmarks`\nwe test from just 320x140 pixels to 14480x8370 pixels for over 200 masks per-image.\n\nWe allow you to decode using in-memory compression or directly into a flat buffer giving you the \nflexibility to choose depending on your performance and memory needs.\n\n![](./docs/images/bench_time/compressed/more_samples_log-linear.png)\n\n![](./docs/images/bench_mem_usage/compressed/more_samples_log-log.png)\n\n\nQuickstart\n==========\n\nThis is a simple example of getting you up and running with the cryptomatte-api, loading a file from \ndisk (which validates it) and then extract one or more masks from the image.\n\n## C++\n```cpp\n#include \u003ccryptomatte/cryptomatte.h\u003e\n\nauto matte = cmatte::cryptomatte::load(\"from/disk/path\", false /* load preview channels */);\nauto mask = matte.mask(\"my_mask\"); // will throw if 'my_mask' is not available\nauto all_masks = matte.masks_compressed(); // get all the masks as compressed channels.\n```\n\n## Python\n```py\nimport cryptomatte_api as cmatte\n\nmatte = cmatte.Cryptomatte.load(\"from/disk/path\", load_preview=False)\nmask = matte.mask(\"my_mask\") # will raise if 'my_mask' is not available\nall_masks = matte.masks() # get all the masks of the cryptomatte mapped by names.\n```\n\nLicense\n=======\n```\nBSD 3-Clause License\n\nCopyright (c) 2025, Emil Dohne\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n\tlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n\tthis list of conditions and the following disclaimer in the documentation\n\tand/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n\tcontributors may be used to endorse or promote products derived from\n\tthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femildohne%2Fcryptomatte-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femildohne%2Fcryptomatte-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femildohne%2Fcryptomatte-api/lists"}