Add meson option for the tiff cfa pattern bug

This commit is contained in:
Martijn Braam
2020-12-22 17:13:36 +01:00
parent 684a81e546
commit edd1de7a9e
3 changed files with 9 additions and 1 deletions

View File

@@ -236,11 +236,12 @@ process_image_for_capture(const MPImage *image, int count)
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
static const short cfapatterndim[] = { 2, 2 };
TIFFSetField(tif, TIFFTAG_CFAREPEATPATTERNDIM, cfapatterndim);
#if (TIFFLIB_VERSION < 20201219)
#if (TIFFLIB_VERSION < 20201219) && !LIBTIFF_CFA_PATTERN
TIFFSetField(tif, TIFFTAG_CFAPATTERN, "\002\001\001\000"); // BGGR
#else
TIFFSetField(tif, TIFFTAG_CFAPATTERN, 4, "\002\001\001\000"); // BGGR
#endif
printf("TIFF version %d\n", TIFFLIB_VERSION);
if (camera->whitelevel) {
TIFFSetField(tif, TIFFTAG_WHITELEVEL, 1, &camera->whitelevel);
}