Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. TinyDNG

TinyDNG

MITC

Header-only C++ library for loading and writing DNG/TIFF files with support for RAW, lossless JPEG, and ZIP compression.

GitHubGitHub
185 stars35 forks0 contributors

What is TinyDNG?

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.

Target Audience

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.

Value Proposition

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.

Overview

Header-only Tiny DNG/TIFF loader and writer in C++

Use Cases

Best For

  • Processing RAW camera files in C++ applications
  • Building lightweight image viewers for DNG/TIFF formats
  • Integrating DNG support into embedded systems or mobile apps
  • Converting DNG files to other formats like EXR
  • Handling lossless JPEG compression in image pipelines
  • Developing tools for photography or computer vision that require raw image data

Not Ideal For

  • Applications requiring lossy DNG support, such as CinemaDNG or other compressed formats
  • Projects needing an all-in-one RAW development pipeline with built-in debayering and color correction
  • Handling very large DNG files over 4GB, as Big TIFF support is not yet implemented
  • Teams relying on extensive camera RAW format support beyond DNG, like full Nikon NEF or Canon mRAW/sRAW variants

Pros & Cons

Pros

Header-Only Simplicity

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.

Security-Focused Design

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.

Lossless Format Support

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.

Memory and Threaded Loading

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.

Cons

Limited Camera RAW Support

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.

No Built-In RAW Processing

The README explicitly states that developers must implement their own debayering code to develop images, adding complexity compared to libraries with full processing pipelines.

Incomplete Feature Set

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.

Frequently Asked Questions

Quick Stats

Stars185
Forks35
Contributors0
Open Issues17
Last commit17 days ago
CreatedSince 2016

Tags

#embedded-systems#c-plus-plus#lossless-compression#image-processing#computer-vision#header-only

Built With

m
miniz
C
C++11
z
zlib
s
stb_image

Included in

C/C++70.6kGame Engine Development1.3k
Auto-fetched 16 hours ago

Related Projects

imguiimgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Stars74,986
Forks11,931
Last commit1 day ago
C/C++C/C++

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

Stars72,398
Forks8,320
Last commit5 days ago
ProtoBufProtoBuf

Protocol Buffers - Google's data interchange format

Stars71,621
Forks16,200
Last commit15 hours ago
JSON for Modern C++JSON for Modern C++

JSON for Modern C++

Stars50,198
Forks7,437
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub