Browse Source

Fix libtiff 4.2 incompatability

Martijn Braam 4 years ago
parent
commit
684a81e546
1 changed files with 4 additions and 0 deletions
  1. 4 0
      process_pipeline.c

+ 4 - 0
process_pipeline.c

@@ -236,7 +236,11 @@ 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)
 	TIFFSetField(tif, TIFFTAG_CFAPATTERN, "\002\001\001\000"); // BGGR
+#else
+	TIFFSetField(tif, TIFFTAG_CFAPATTERN, 4, "\002\001\001\000"); // BGGR
+#endif
 	if (camera->whitelevel) {
 		TIFFSetField(tif, TIFFTAG_WHITELEVEL, 1, &camera->whitelevel);
 	}