aports/testing/libdng/libtiff.patch
2024-08-14 21:39:06 +00:00

26 lines
953 B
Diff

From 9c7b18e7ff687a8c69704dc6fc8e7689e2532060 Mon Sep 17 00:00:00 2001
From: Martijn Braam <martijn@brixit.nl>
Date: Sun, 28 Apr 2024 00:05:51 +0200
Subject: [PATCH] Fix CFARepeatPattern for newer libtiff versions
---
src/libdng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libdng.c b/src/libdng.c
index 6b0cd4f..317dd85 100644
--- a/src/libdng.c
+++ b/src/libdng.c
@@ -375,7 +375,7 @@ libdng_write_with_thumbnail(libdng_info *dng, const char *path, unsigned int wid
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-#if (TIFFLIB_VERSION > 20230000)
+#if (TIFFLIB_VERSION > 20230000 && TIFFLIB_VERSION < 20240321)
TIFFSetField(tif, DNGTAG_CFAREPEATPATTERNDIM, 2, dng->bayer_pattern_dimensions);
#else
TIFFSetField(tif, DNGTAG_CFAREPEATPATTERNDIM, dng->bayer_pattern_dimensions);
--
GitLab