{"id":17632755,"url":"https://github.com/nvidia/nvimagecodec","last_synced_at":"2026-01-12T09:13:36.693Z","repository":{"id":220410843,"uuid":"700454162","full_name":"NVIDIA/nvImageCodec","owner":"NVIDIA","description":"A nvImageCodec library of GPU- and CPU- accelerated codecs featuring a unified interface","archived":false,"fork":false,"pushed_at":"2025-03-20T13:50:34.000Z","size":23371,"stargazers_count":102,"open_issues_count":13,"forks_count":8,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-12T14:25:42.655Z","etag":null,"topics":["computer-vision","cpp","cuda","dali","data-processing","deep-learning","fast-data-pipeline","gpu","image-processing","machine-learning","nvidia","python","pytorch"],"latest_commit_sha":null,"homepage":"https://docs.nvidia.com/cuda/nvimagecodec/index.html","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NVIDIA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.rst","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-04T16:16:26.000Z","updated_at":"2025-05-08T09:20:23.000Z","dependencies_parsed_at":"2024-10-23T07:19:05.414Z","dependency_job_id":"7b2e4526-35b9-4ba1-8d0e-59b87f2be691","html_url":"https://github.com/NVIDIA/nvImageCodec","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"1c3677685d2fc568be12845720e30091bae3634e"},"previous_names":["nvidia/nvimagecodec"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA%2FnvImageCodec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA%2FnvImageCodec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA%2FnvImageCodec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVIDIA%2FnvImageCodec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NVIDIA","download_url":"https://codeload.github.com/NVIDIA/nvImageCodec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"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","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":["computer-vision","cpp","cuda","dali","data-processing","deep-learning","fast-data-pipeline","gpu","image-processing","machine-learning","nvidia","python","pytorch"],"created_at":"2024-10-23T01:45:33.831Z","updated_at":"2026-01-12T09:13:36.686Z","avatar_url":"https://github.com/NVIDIA.png","language":"Jupyter Notebook","readme":"# nvImageCodec\n\n![Version](https://img.shields.io/badge/Version-v0.7.0--beta-blue)\n[![License](https://img.shields.io/badge/License-Apache_2.0-yellogreen.svg)](https://opensource.org/licenses/Apache-2.0)\n\n![Platform](https://img.shields.io/badge/Platform-linux--x86__64_%7C_linux--aarch64_%7C_windows--64_wsl2_%7C_windows--64-blue)\n\n[![Cuda](https://img.shields.io/badge/CUDA-v12.0_%7c_v13.0-%2376B900?logo=nvidia)](https://developer.nvidia.com/cuda-toolkit-archive)\n[![GCC](https://img.shields.io/badge/GCC-\u003e=v14.0-yellow)](https://gcc.gnu.org/gcc-9/)\n[![CMake](https://img.shields.io/badge/CMake-\u003e=v3.18-%23008FBA?logo=cmake)](https://cmake.org/)\n\n\n[![Python](https://img.shields.io/badge/python-v3.9_%7c_v3.10_%7c_v3.11_%7c_v3.12_%7c_v3.13_%7c_v3.13t_%7c_v3.14_%7c_v3.14t-blue?logo=python)](https://www.python.org/)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/nvidia-nvimgcodec-cu12?pypiBaseUrl=https%3A%2F%2Fpypi.org\u0026label=PyPI\u0026link=https%3A%2F%2Fpypi.org%2Fsearch%2F%3Fq%3Dnvidia-nvimgcodec-cu12)\n\n\nThe nvImageCodec is an open-source library of accelerated codecs with unified interface.\nIt is designed as a framework for extension modules which delivers codec plugins.\n\nThis nvImageCodec release includes the following key features:\n\n- Unified API for decoding and encoding images\n- Batch processing, with variable shape and heterogeneous formats images\n- Codec prioritization with automatic fallback\n- Builtin parsers for image format detection: jpeg, jpeg2000, tiff, bmp, png, pnm, webp \n- Python bindings\n- Zero-copy interfaces to CV-CUDA, PyTorch and CuPy \n- End-end accelerated sample applications for common image transcoding\n\nCurrently there are following native codec extensions:\n\n- nvjpeg_ext\n   - Hardware jpeg decoder\n   - Hardware jpeg encoder (on Jetson Thor)\n   - CUDA jpeg decoder\n   - CUDA lossless jpeg decoder\n   - CUDA jpeg encoder\n\n- nvjpeg2k_ext\n\n   - CUDA jpeg 2000 decoder (including High Throughput Jpeg2000)\n   - CUDA jpeg 2000 encoder (including High Throughput Jpeg2000)\n\n- nvtiff_ext\n\n   - CUDA TIFF decoder\n   - CUDA TIFF encoder\n\n- nvbmp_ext (as an example extension module)\n\n   - CPU bmp reader\n   - CPU bmp writer\n\n- nvpnm_ext (as an example extension module)\n\n   - CPU pnm (ppm, pbm, pgm) writer\n\nAdditionally as a fallback there are following 3rd party codec extensions:\n\n- libturbo-jpeg_ext\n\n   - CPU jpeg decoder\n\n- libtiff_ext \n\n   - CPU tiff decoder\n\n- opencv_ext\n\n   - CPU jpeg decoder \u0026 encoder\n   - CPU jpeg2k_decoder \u0026 encoder\n   - CPU png decoder \u0026 encoder\n   - CPU bmp decoder \u0026 encoder\n   - CPU pnm decoder \u0026 encoder\n   - CPU tiff decoder \u0026 encoder\n   - CPU webp decoder \u0026 encoder\n\n\n## Pre-requisites\n\nThis section describes the recommended dependencies to use nvImageCodec.\n\n- Linux distro:\n   - x86_64\n     - Debian 12\n     - Fedora 41\n     - RHEL 8, 9\n     - OpenSUSE 15\n     - SLES 15\n     - Ubuntu 20.04, 22.04, 24.04\n     - WSL2 Ubuntu 20.04\n   - arm64-sbsa\n      - RHEL 8, 9\n      - SLES 15\n      - Ubuntu 20.04, 22.04, 24.04\n   - aarch64-jetson (CUDA Toolkit \u003e= 12.1, \u003c 13.0)\n      - Ubuntu 22.04\n   - NVIDIA driver \u003e= 530.30.02\n- Windows\n   - x86_64\n     - [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170)\n   - NVIDIA driver \u003e= 531.14\n- CUDA Toolkit \u003e= 12.1\n- GCC \u003e= 14.0\n- Python \u003e= 3.9\n\n## Install nvImageCodec library\n\nYou can download and install the appropriate built binary packages from the [nvImageCodec Developer Page](https://developer.nvidia.com/nvimgcodec-downloads) or install nvImageCodec Python from PyPI as it is described below.\n\n| CUDA version                 | Instructions                                   |\n| -----------------------------|------------------------------------------------|\n| CUDA 12.x, 13.x              | `pip install nvidia-nvimgcodec-cu{12, 13}`     |\n| CUDA 12.x (Tegra platforms)  | `pip install nvidia-nvimgcodec-tegra-cu{12}`   |\n\n### Installing optional dependencies\n-----------------------------\nYou can also install optional dependencies to run the nvjpeg, nvjpeg2k and nvtiff plugins.\n\nTo install nvImageCodec with all the optional dependencies, you can do\n\n| CUDA version                 | Instructions                                      |\n| -----------------------------|---------------------------------------------------|\n| CUDA 12.x, 13.x              | `pip install nvidia-nvimgcodec-cu{12, 13}[all]`   |\n| CUDA 12.x (Tegra platforms)  | `pip install nvidia-nvimgcodec-tegra-cu{12}[all]` |\n\nAlternatively, you can specify a subset of the dependencies: `nvjpeg`, `nvjpeg2k`, `nvtiff`. Here are some examples:\n\n| CUDA version                          | Instructions                                                      |\n| --------------------------------------|-------------------------------------------------------------------|\n| nvjpeg2k extension support            | `pip install nvidia-nvimgcodec-cu{12, 13}[nvjpeg2k]`              |\n| nvjpeg2k and nvtiff extension support | `pip install nvidia-nvimgcodec-cu{12, 13}[nvjpeg2k+nvtiff]`       |\n\nIn the following subsections, you can see how to install those dependencies manually, instead of relying on nvimagecodec's \"extra\" packages.\n\n### Manual installation of nvJPEG library\n\nIf you do not have CUDA Toolkit installed, or you would like install nvJPEG library independently, you can install it manually as a Python package\n\n| CUDA version          | Instructions                                   |\n| ----------------------|------------------------------------------------|\n| CUDA 12.x, 13.x       | `pip install nvidia-nvjpeg-cu{12, 13}`         |\n\n### Manual installation of nvJPEG2000 library\n\n[nvJPEG2000 library](https://developer.nvidia.com/nvjpeg2000-downloads) can be installed in the system, or installed as a Python package. For the latter, follow the instructions below.\n\n| CUDA version                | Instructions                                 |\n| ----------------------------|----------------------------------------------|\n| CUDA 12.x, 13.x             | `pip install nvidia-nvjpeg2k-cu{12, 13}`     |\n| CUDA 12.x (Tegra platforms) | `pip install nvidia-nvjpeg2k-tegra-cu{12}`   |\n\nPlease see also [nvJPEG2000 installation documentation](https://docs.nvidia.com/cuda/nvjpeg2000/userguide.html#installing-nvjpeg2000) for more information.\n\n### Manual installation of nvTIFF library\n\n[nvTIFF library](https://developer.nvidia.com/nvtiff-downloads) can be installed in the system, or installed as a Python package. For the latter, follow the instructions below.\n\n| CUDA version                 | Instructions                               |\n| -----------------------------|--------------------------------------------|\n| CUDA 12.x, 13.x              | `pip install nvidia-nvtiff-cu{12, 13}`     |\n| CUDA 12.x (Tegra platforms)  | `pip install nvidia-nvtiff-tegra-cu{12}`   |\n\nPlease see also [nvTIFF installation documentation](https://docs.nvidia.com/cuda/nvtiff/userguide.html#installing-nvtiff) for more information.\n\n### Manual installation of nvCOMP library\n\n[nvCOMP library](https://developer.nvidia.com/nvcomp-download) can be installed in the system, or installed as a Python package. For the latter, follow the instructions below.\nnvCOMP is required if you want to use nvTIFF with images that use Deflate compression.\n\n| CUDA version                 | Instructions                                   |\n| -----------------------------|------------------------------------------------|\n| CUDA 12.x, 13.x              | `pip install nvidia-libnvcomp-cu{12, 13}`         |\n\nPlease see also [nvCOMP installation documentation](https://docs.nvidia.com/cuda/nvcomp/installation.html) for more information.\n\n### Documentation\n\n[NVIDIA nvImageCodec Documentation](https://docs.nvidia.com/cuda/nvimagecodec/)\n\n## Build and install from Sources\n\n### Additional pre-requisites\n- Linux\n  - GCC \u003e= 14.0\n  - cmake \u003e= 3.18\n  - patchelf \u003e= 0.17.2\n- Windows\n  - [Microsoft Visual Studio 2022 Build Tools](https://aka.ms/vs/17/release/vs_buildtools.exe)\n- Dependencies for extensions. If you would not like to build particular extension you can skip it.\n  - nvJPEG2000 \u003e= 0.9.0\n  - nvTIFF \u003e= 0.5.1\n  - nvCOMP \u003e= 5.0.0\n  - libjpeg-turbo \u003e= 2.0.0\n  - libtiff \u003e= 4.5.0\n  - opencv \u003e= 4.9.0\n- Python packages: \n  - clang==14.0.1 \n  - wheel\n  - setuptools\n  - sphinx_rtd_theme\n  - breathe \n  - future\n  - flake8\n  - sphinx==4.5.0\n\nPlease see also Dockerfiles.\n\n### Build\n\n#### Linux\n\n```\ngit lfs clone https://github.com/NVIDIA/nvImageCodec.git\ncd nvimagecodec\ngit submodule update --init --recursive --depth 1\nmkdir build\ncd build\nexport CUDACXX=nvcc\ncmake .. -DCMAKE_BUILD_TYPE=Release\nmake\n```\n##### Build CVCUDA samples\n\nTo build CV-CUDA samples, additionally CV-CUDA has to be installed and CVCUDA_DIR and NVCV_TYPES_DIR\nneed to point folders with *-config.cmake files. Apart of that, BUILD_CVCUDA_SAMPLES variable must be set to ON.\n\n#### Windows\n\nOpen Developer Command Prompt for VS 2022\n\n```\ngit lfs clone https://github.com/NVIDIA/nvImageCodec.git\ncd nvimagecodec\ngit submodule update --init --recursive --depth 1\n.\\externa\\build_deps.bat\n.\\docker\\build_helper.bat .\\build 12\n```\n\n## Build Python wheel\n\nAfter succesfully built project, execute below commands.\n\n```\ncd build\ncmake --build . --target wheel\n```\n\n## Packaging\n\nFrom a successfully built project, installers can be generated using cpack:\n```\ncd build\ncpack --config CPackConfig.cmake -DCMAKE_BUILD_TYPE=Release\n```\nThis will generate in build directory *.zip or *tar.xz files\n\n\n## Installation from locally built packages\n\n#### Tar file installation\n\n```\ntar -xvf nvimgcodec-0.7.0.0-cuda12-x86_64-linux-lib.tar.gz -C /opt/nvidia/\n```\n\n#### DEB File Installation\n```\nsudo apt-get install -y ./nvimgcodec-0.7.0.0-cuda12-x86_64-linux-lib.deb\n```\n#### Python WHL File Installation\n\n```\npip install nvidia_nvimgcodec_cu12-0.7.0-py3-none-manylinux_2_28_x86_64.whl\n```\n\n### Installation from sources\n\n##### Linux\n```\ncd build\ncmake --install . --config Release --prefix /opt/nvidia/nvimgcodec_\u003cmajor_cuda_ver\u003e\n```\n\nAfter execution there should be:\n- all extension modules in /opt/nvidia/nvimgcodec_cuda\u003cmajor_cuda_ver\u003e/extensions (it is default directory for extension discovery)\n- libnvimgcodec.so in /opt/nvidia/nvimgcodec_cuda\u003cmajor_cuda_ver\u003e/lib64\n\nAdd directory with libnvimgcodec.so to LD_LIBRARY_PATH\n\n```\nexport LD_LIBRARY_PATH=/opt/nvidia/nvimgcodec_cuda\u003cmajor_cuda_ver\u003e/lib64:$LD_LIBRARY_PATH\n```\n\n##### Windows\n\nOpen Developer Command Prompt for VS 2022\n\n```\ncd build\ncmake --install . --config Release --prefix \"c:\\Program Files\\nvimgcodec_cuda\u003cmajor_cuda_ver\u003e\"\n```\n\nAfter execution there should be:\n\n- all extension modules in c:\\Program Files\\nvimgcodec_cuda\u003cmajor_cuda_ver\u003e/extensions (it is default directory for extension discovery)\n- nvimgcodec_0.dll in c:\\Program Files\\nvimgcodec_cuda\u003cmajor_cuda_ver\u003e\\bin\n\nAdd directory with nvimgcodec_0.dll to PATH\n\n## Testing\nRun CTest to execute L0 and L1 tests\n```\ncd build\ncmake --install . --config Release --prefix bin\nctest -C Release\n```\n\nRun sample transcoder app tests\n```\ncd build\ncmake --install . --config Release --prefix bin\ncd bin/test\n\nLD_LIBRARY_PATH=$PWD/../lib64 pytest -v test_transcode.py\n\n```\n\nRun Python API tests\n\nFirst install python wheel. You would also need to have installed all Python tests dependencies (see Dockerfiles). \n\n```\npip install nvidia_nvimgcodec_cu12-0.7.0.x-py3-none-manylinux_2_28_x86_64.whl\n```\n\nRun tests\n```\ncd tests\npytest -v ./python\n```\n\n## CMake package integration\n\nTo use nvimagecodec as a dependency in your CMake project, use:\n```\nlist(APPEND CMAKE_PREFIX_PATH \"/opt/nvidia/nvimgcodec_cuda\u003cmajor_cuda_ver\u003e/\")  # or the prefix where the package was installed if custom\n\nfind_package(nvimgcodec CONFIG REQUIRED)\n# Mostly for showing some of the variables defined\nmessage(STATUS \"nvimgcodec_FOUND=${nvimgcodec_FOUND}\")\nmessage(STATUS \"nvimgcodec_INCLUDE_DIR=${nvimgcodec_INCLUDE_DIR}\")\nmessage(STATUS \"nvimgcodec_LIB_DIR=${nvimgcodec_LIB_DIR}\")\nmessage(STATUS \"nvimgcodec_BIN_DIR=${nvimgcodec_BIN_DIR}\")\nmessage(STATUS \"nvimgcodec_LIB=${nvimgcodec_LIB}\")\nmessage(STATUS \"nvimgcodec_EXTENSIONS_DIR=${nvimgcodec_EXTENSIONS_DIR}\")\nmessage(STATUS \"nvimgcodec_VERSION=${nvimgcodec_VERSION}\")\n\ntarget_include_directories(\u003cyour-target\u003e PUBLIC ${nvimgcodec_INCLUDE_DIR})\ntarget_link_directories(\u003cyour-target\u003e PUBLIC ${nvimgcodec_LIB_DIR})\ntarget_link_libraries(\u003cyour-target\u003e PUBLIC ${nvimgcodec_LIB})\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvidia%2Fnvimagecodec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvidia%2Fnvimagecodec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvidia%2Fnvimagecodec/lists"}