Explorar o código

process_pipeline: Correctly set BlackLevel TIFF tag

Sebastian Krzyszkowiak %!s(int64=4) %!d(string=hai) anos
pai
achega
3691ece911
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/process_pipeline.c

+ 2 - 1
src/process_pipeline.c

@@ -429,7 +429,8 @@ process_image_for_capture(const uint8_t *image, int count)
 		TIFFSetField(tif, TIFFTAG_WHITELEVEL, 1, &camera->whitelevel);
 	}
 	if (camera->blacklevel) {
-		TIFFSetField(tif, TIFFTAG_BLACKLEVEL, 1, &camera->blacklevel);
+		const float blacklevel = camera->blacklevel;
+		TIFFSetField(tif, TIFFTAG_BLACKLEVEL, 1, &blacklevel);
 	}
 	TIFFCheckpointDirectory(tif);
 	printf("Writing frame to %s\n", fname);