process_pipeline: Correctly set BlackLevel TIFF tag

This commit is contained in:
Sebastian Krzyszkowiak 2021-06-02 04:39:37 +02:00 committed by Martijn Braam
parent 52cc52437e
commit 3691ece911
1 changed files with 2 additions and 1 deletions

View File

@ -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);