Header-only C++ library for loading and writing DNG/TIFF files with support for RAW, lossless JPEG, and ZIP compression.
TinyDNG is a header-only C++ library for loading and writing DNG and TIFF image files. It specializes in lossless formats like RAW and lossless JPEG, providing a lightweight solution for applications that need to handle camera raw data without complex dependencies. The library is designed to be simple, secure, and suitable for integration into projects where minimal overhead is crucial.
C++ developers working on image processing, computer vision, or photography applications that require efficient handling of DNG and TIFF files, especially those dealing with camera raw data.
Developers choose TinyDNG for its header-only design, which eliminates build complications, and its focus on security through fuzz testing. It offers a straightforward API for both reading and writing DNG/TIFF files with support for key compression formats, all in a minimal codebase.
Header-only Tiny DNG/TIFF loader and writer in C++
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
As a header-only library, TinyDNG eliminates complex build systems and dependencies—just define TINY_DNG_LOADER_IMPLEMENTATION in one source file for easy integration, as shown in the usage examples.
The library is rigorously fuzz-tested using LLVMFuzzer, ensuring reliability and safety when handling malformed DNG files, which is critical for image processing applications dealing with untrusted data.
Specializes in lossless RAW DNG, lossless JPEG via liblj92, and ZIP compression using miniz or zlib, making it ideal for quality-preserving workflows without heavy dependencies.
Supports reading DNG data directly from memory with LoadDNGFromMemory API and offers optional threaded loading via TINY_DNG_LOADER_USE_THREAD, enhancing performance in resource-constrained environments.
Experimental support for formats like Canon CR2 excludes mRAW and sRAW, and Nikon NEF decoding is listed as TODO, which may restrict use with certain camera files.
The README explicitly states that developers must implement their own debayering code to develop images, adding complexity compared to libraries with full processing pipelines.
The TODO list includes missing features like Big TIFF support and more DNG header parsing, indicating the library is still under development and may not cover all edge cases.