From 3691ece911f8acf6adef88808784bd9139c1efbd Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Wed, 2 Jun 2021 04:39:37 +0200 Subject: [PATCH] process_pipeline: Correctly set BlackLevel TIFF tag --- src/process_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/process_pipeline.c b/src/process_pipeline.c index 830d2ad..8cec510 100644 --- a/src/process_pipeline.c +++ b/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);