Skip to content

[AI] Add TIFFTAG_PREVIEWCOLORSPACE fallback for libtiff < 4.6#20933

Merged
TurboGit merged 1 commit intodarktable-org:masterfrom
andriiryzhkov:fix_dng_20932
May 5, 2026
Merged

[AI] Add TIFFTAG_PREVIEWCOLORSPACE fallback for libtiff < 4.6#20933
TurboGit merged 1 commit intodarktable-org:masterfrom
andriiryzhkov:fix_dng_20932

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Contributor

Fixes #20932

imageio_dng.c fails to compile on libtiff < 4.6 (Debian 12, Ubuntu 22.04 / 24.04) because TIFFTAG_PREVIEWCOLORSPACE was only added in libtiff 4.6.

Adds a one-line #ifndef fallback that defines the macro to its DNG-spec value (50970) when libtiff didn't.

Verified against libtiff 4.3.0 source – it's the only DNG tag darktable uses that's missing in pre-4.6; everything else (DNGVERSION, COLORMATRIX1, BLACKLEVEL, ACTIVEAREA, …) has been there since 4.0.

@TurboGit TurboGit added this to the 5.6 milestone May 5, 2026
@TurboGit TurboGit added bugfix pull request fixing a bug priority: release critical cannot release until fixed labels May 5, 2026
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit TurboGit merged commit 5c68081 into darktable-org:master May 5, 2026
5 checks passed
@andriiryzhkov andriiryzhkov deleted the fix_dng_20932 branch May 5, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug priority: release critical cannot release until fixed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

imageio_dng.c error: ‘TIFFTAG_PREVIEWCOLORSPACE’ undeclared (first use in this function)

2 participants